#include "xict_cpp/core/stage/canet_processor.h"

namespace xict_cpp {
    namespace core {
        namespace stage {
            bool CanetProcessorStage::Init() {
                CanetProcessorStageParams params;
                return Init(params);
            }

            bool
            CanetProcessorStage::Init(const CanetProcessorStageParams& params) {
                params_ = params;
                return Initialize();
            }

            bool CanetProcessorStage::Initialize() {
#ifdef SELFMADE_HANDLE
                pub_.right_joystick_status_pub =
                    eCAL::protobuf::CPublisher<xcmg_proto::JoystickStatus>(
                        "right_joystick_status");
                pub_.left_joystick_status_pub =
                    eCAL::protobuf::CPublisher<xcmg_proto::JoystickStatus>(
                        "left_joystick_status");
                pub_.right_handle_status_pub =
                    eCAL::protobuf::CPublisher<xcmg_proto::HandleStatus>(
                        "right_handle_status");
                pub_.left_handle_status_pub =
                    eCAL::protobuf::CPublisher<xcmg_proto::HandleStatus>(
                        "left_handle_status");
#endif

#ifdef GRADER
                pub_.grader_can_status_pub =
                    eCAL::protobuf::CPublisher<xcmg_proto::Grader_CAN>(
                        params_.vehicle_type);
#endif

#ifdef LOADER
                pub_.loader_can_status_pub =
                    eCAL::protobuf::CPublisher<xcmg_proto::Loader_CAN>(
                        params_.vehicle_type);
#endif

#ifdef BACKHOE_LOADER
                pub_.backhoe_loader_can_status_pub =
                    eCAL::protobuf::CPublisher<xcmg_proto::BackhoeLoader_CAN>(
                        params_.vehicle_type);
#endif

#ifdef SCRAPER
                pub_.scraper_can_status_pub =
                    eCAL::protobuf::CPublisher<xcmg_proto::Scraper_CAN>(
                        params_.vehicle_type);
#endif

                data_.right_joystick_status_ptr =
                    std::make_shared<xcmg_proto::JoystickStatus>();
                data_.left_joystick_status_ptr =
                    std::make_shared<xcmg_proto::JoystickStatus>();
                data_.right_handle_status_ptr =
                    std::make_shared<xcmg_proto::HandleStatus>();
                data_.left_handle_status_ptr =
                    std::make_shared<xcmg_proto::HandleStatus>();

                data_.grader_can_status_ptr =
                    std::make_shared<xcmg_proto::Grader_CAN>();
                data_.loader_can_status_ptr =
                    std::make_shared<xcmg_proto::Loader_CAN>();
                data_.backhoe_loader_can_status_ptr =
                    std::make_shared<xcmg_proto::BackhoeLoader_CAN>();
                data_.scraper_can_status_ptr =
                    std::make_shared<xcmg_proto::Scraper_CAN>();

                udp_sock_ptr_ = std::make_shared<bridge::UdpSocket>(
                    io_service_, params_.canet_port, true);
                // udp_sock_ptr_->Send("hello");
                udp_sock_ptr_->SetMessageCallback(
                    std::bind(&CanetProcessorStage::OnMessage, this,
                              std::placeholders::_1, std::placeholders::_2));
                ADEBUG_F("Canet param: {}:{}", params_.canet_ip,
                         params_.canet_port);

                imu_sock_ptr_ = std::make_shared<bridge::UdpSocket>(
                    io_service_, params_.sensation_platform_ip,
                    params_.sensation_platform_port);
                // imu_sock_ptr_->Send("hello sensation platform");
                ADEBUG_F("Sensation platform param: {}:{}",
                         params_.sensation_platform_ip,
                         params_.sensation_platform_port);

                return true;
            }

            std::string CanetProcessorStage::Name() const {
                return "CanetProcessorStage";
            }

            void CanetProcessorStage::Reset() {
                if (data_.right_joystick_status_ptr) {
                    data_.right_joystick_status_ptr.reset();
                    data_.right_joystick_status_ptr = nullptr;
                }

                if (data_.left_joystick_status_ptr) {
                    data_.left_joystick_status_ptr.reset();
                    data_.left_joystick_status_ptr = nullptr;
                }

                if (data_.right_handle_status_ptr) {
                    data_.right_handle_status_ptr.reset();
                    data_.right_handle_status_ptr = nullptr;
                }

                if (data_.left_handle_status_ptr) {
                    data_.left_handle_status_ptr.reset();
                    data_.left_handle_status_ptr = nullptr;
                }

                if (data_.grader_can_status_ptr) {
                    data_.grader_can_status_ptr.reset();
                    data_.grader_can_status_ptr = nullptr;
                }

                if (data_.loader_can_status_ptr) {
                    data_.loader_can_status_ptr.reset();
                    data_.loader_can_status_ptr = nullptr;
                }

                if (data_.scraper_can_status_ptr) {
                    data_.scraper_can_status_ptr.reset();
                    data_.scraper_can_status_ptr = nullptr;
                }

                if (udp_sock_ptr_) {
                    udp_sock_ptr_.reset();
                    udp_sock_ptr_ = nullptr;
                }

                if (imu_sock_ptr_) {
                    imu_sock_ptr_.reset();
                    imu_sock_ptr_ = nullptr;
                }
            }

            bool CanetProcessorStage::Process() {
                if (!mtx_.try_lock_for(std::chrono::milliseconds(
                        int(1000 / params_.msg_framerate)))) {
                    try {
                        if (params_.vehicle_type == "gr5505") {
#ifdef GRADER
                            pub_.grader_can_status_pub.Send(
                                *data_.grader_can_status_ptr);
#endif
                        } else if (params_.vehicle_type == "958ev") {
#ifdef LOADER
                            pub_.loader_can_status_pub.Send(
                                *data_.loader_can_status_ptr);
#endif
                        } else if (params_.vehicle_type == "backhoe") {
#ifdef BACKHOE_LOADER
                            pub_.backhoe_loader_can_status_pub.Send(
                                *data_.backhoe_loader_can_status_ptr);
#endif
                        } else if (params_.vehicle_type == "scraper") {
#ifdef SCRAPER
                            // data_.scraper_can_status_ptr->set_camera_changed(1);
                            pub_.scraper_can_status_pub.Send(
                                *data_.scraper_can_status_ptr);
#endif
                        } else {
                            AERROR_F("Error vehicle type, can't publish data, "
                                     "please "
                                     "check it!!!");
                        }

                        if (params_.use_selfmade_handle) {
#ifdef SELFMADE_HANDLE
                            pub_.left_handle_status_pub.Send(
                                *data_.left_handle_status_ptr);
                            pub_.right_handle_status_pub.Send(
                                *data_.right_handle_status_ptr);

                            pub_.left_joystick_status_pub.Send(
                                *data_.left_joystick_status_ptr);
                            pub_.right_joystick_status_pub.Send(
                                *data_.right_joystick_status_ptr);
#endif
                        }
                    } catch (const std::exception& e) {
                        AERROR_F(
                            "Failed to process data publishing command: {}",
                            e.what());
                        mtx_.unlock();
                        return false;
                    }
                    mtx_.unlock();

                    if (params_.have_sensation_platform) {
                        SendImuData(euler_x_, euler_y_, euler_z_, acc_raw_x_,
                                    acc_raw_y_, acc_raw_z_);
                    }
                }

                return true;
            }

            bool CanetProcessorStage::IsAllZeroValues(const can_msgs* can_ptr) {
                for (uint8_t i = 0; i < can_ptr->dlc; i++) {
                    if (can_ptr->data[i] != 0) {
                        return false;
                    }
                }
                AWARN_F("Received a can frame 0x{:x}, but ALL ZERO!",
                        can_ptr->id);
                return true;
            }

            void CanetProcessorStage::ConvertCanToUdp(const can_msgs can_msg) {
                if (params_.canet_factory == "xcmg") {
                    static uint32_t count = 0;
                    uint8_t vSendData[32] = {0};
                    // 标识符
                    vSendData[0] = 0xFF;
                    vSendData[1] = 0x01;
                    // 协议版本
                    vSendData[2] = 0x00;
                    vSendData[3] = 0x01;
                    // 报文总长度
                    vSendData[4] = 0x00;
                    vSendData[5] = 0x00;
                    vSendData[6] = 0x00;
                    vSendData[7] = 0x20;
                    // 报文流水号
                    vSendData[8]  = (count >> 24) & 0xFF;
                    vSendData[9]  = (count >> 16) & 0xFF;
                    vSendData[10] = (count >> 8) & 0xFF;
                    vSendData[11] = (count >> 0) & 0xFF;
                    // 帧类型
                    vSendData[12] = 0x00;
                    // reserved
                    vSendData[13] = 0x00;
                    vSendData[14] = 0x00;
                    vSendData[15] = 0x00;

                    // can数据包1
                    // 数据包标志
                    vSendData[16] = 0x00;
                    // 源can端口
                    vSendData[17] = 0x01;
                    // can长度
                    vSendData[18] = 0x00;
                    vSendData[19] = 0x08;
                    // canId
                    uint32_t id;
                    id            = can_msg.id;
                    vSendData[20] = id >> 24 & 0xFF;   // 00
                    vSendData[21] = id >> 16 & 0xFF;
                    vSendData[22] = id >> 8 & 0xFF;
                    vSendData[23] = id & 0xFF;
                    //    qDebug()<<id;
                    // payload
                    if (count < 0xFFFFFFFF)
                        count++;
                    else
                        count = 0;
                    for (uint8_t i = 0; i < can_msg.dlc; i++) {
                        vSendData[i + 24] = can_msg.data[i];
                    }
                    ADEBUG_F("Send can to udp: 0x{:x}", can_msg.id);
                    udp_sock_ptr_->Send(vSendData, 13);
                } else if (params_.canet_factory == "zlg") {
                    uint8_t info          = can_msg.dlc;
                    uint8_t vSendData[13] = {0};

                    if (can_msg.is_rtr) {
                        info |= 0x40;
                    }

                    if (can_msg.is_extended) {
                        info |= 0x80;
                    }

                    vSendData[0] = info;

                    xict_common::utils::Uint32_bytes id {};
                    id.data      = can_msg.id;
                    vSendData[1] = id.bytes[3];
                    vSendData[2] = id.bytes[2];
                    vSendData[3] = id.bytes[1];
                    vSendData[4] = id.bytes[0];
                    for (uint8_t i = 0; i < can_msg.dlc; i++) {
                        vSendData[5 + i] = can_msg.data[i];
                    }
                    ADEBUG_F("Send can to udp: 0x{:x}", can_msg.id);
                    udp_sock_ptr_->Send(vSendData, 13);
                } else {
                    AERROR_F(
                        "Unknown canet factory: {}, can't convert can frame "
                        "to udp, "
                        "please "
                        "check it!",
                        params_.canet_factory);
                }
            }

            void CanetProcessorStage::ConvertUdpToCan(const uint8_t* udp_ptr,
                                                      can_msgs* can_ptr) {
                xict_common::utils::Uint32_bytes id {};
                if (params_.canet_factory == "xcmg") {
                    // c->dlc = ((u[0] >> 0) & 0x0F);
                    id.bytes[0]          = udp_ptr[7];
                    id.bytes[1]          = udp_ptr[6];
                    id.bytes[2]          = udp_ptr[5];
                    id.bytes[3]          = udp_ptr[4];
                    can_ptr->id          = id.data;
                    can_ptr->dlc         = 8;
                    can_ptr->is_extended = true;
                    can_ptr->is_rtr      = false;
                    for (uint8_t i = 0; i < (can_ptr->dlc); i++) {
                        can_ptr->data[i] = udp_ptr[i + 8];
                    }
                } else if (params_.canet_factory == "zlg") {
                    can_ptr->dlc         = ((udp_ptr[0] >> 0) & 0x0F);
                    id.bytes[0]          = udp_ptr[4];
                    id.bytes[1]          = udp_ptr[3];
                    id.bytes[2]          = udp_ptr[2];
                    id.bytes[3]          = udp_ptr[1];
                    can_ptr->id          = id.data;
                    can_ptr->is_rtr      = ((udp_ptr[0] >> 6) & 0x01);
                    can_ptr->is_extended = ((udp_ptr[0] >> 7) & 0x01);
                    for (uint8_t i = 0; i < can_ptr->dlc; i++) {
                        can_ptr->data[i] = udp_ptr[i + 5];
                    }
                } else {
                    AERROR_F(
                        "Error canet factory: {}, can't convert udp to can, "
                        "please check "
                        "it !!!",
                        params_.canet_factory);
                }
            }

            void CanetProcessorStage::SendImuData(float euler_x, float euler_y,
                                                  float euler_z,
                                                  float acc_raw_x,
                                                  float acc_raw_y,
                                                  float acc_raw_z) {
                euler_x = euler_x > params_.sensation_platform_range_x
                              ? params_.sensation_platform_range_x
                              : euler_x;
                euler_x = euler_x < -params_.sensation_platform_range_x
                              ? -params_.sensation_platform_range_x
                              : euler_x;
                euler_y = euler_y > params_.sensation_platform_range_y
                              ? params_.sensation_platform_range_y
                              : euler_y;
                euler_y = euler_y < -params_.sensation_platform_range_y
                              ? -params_.sensation_platform_range_y
                              : euler_y;
                euler_z = euler_z > params_.sensation_platform_range_z
                              ? params_.sensation_platform_range_z
                              : euler_z;
                euler_z = euler_z < -params_.sensation_platform_range_z
                              ? -params_.sensation_platform_range_z
                              : euler_z;

                unsigned char data[64] = {0};
                t_cur_                 = t_cur_ + 4;
                data[0]                = t_cur_;
                data[1]                = t_cur_ >> 8;
                data[2]                = t_cur_ >> 16;
                data[3]                = t_cur_ >> 24;
                data[4]                = 0x00;
                data[5]                = 0x00;
                data[6]                = 0x00;
                data[7]                = 0x00;
                data[8]                = 0x00;
                data[9]                = 0x00;
                data[10]               = 0x00;
                data[11]               = 0x00;
                data[12]               = 0x00;
                data[13]               = 0x00;
                data[14]               = 0x00;
                data[15]               = 0x00;
                data[16]               = ((unsigned char*)(&euler_x))[0];   // X
                data[17]               = ((unsigned char*)(&euler_x))[1];   // X
                data[18]               = ((unsigned char*)(&euler_x))[2];   // X
                data[19]               = ((unsigned char*)(&euler_x))[3];   // X
                data[20]               = ((unsigned char*)(&euler_y))[0];   // X
                data[21]               = ((unsigned char*)(&euler_y))[1];   // X
                data[22]               = ((unsigned char*)(&euler_y))[2];   // X
                data[23]               = ((unsigned char*)(&euler_y))[3];   // X
                data[24]               = 0x00;                              // Y
                data[25]               = 0x00;                              // Y
                data[26]               = 0x00;                              // Y
                data[27]               = 0x00;                              // Y
                data[28]               = 0x00;
                data[29]               = 0x00;
                data[30]               = 0x00;
                data[31]               = 0x00;
                data[32]               = 0x00;
                data[33]               = 0x00;
                data[34]               = 0x00;
                data[35]               = 0x00;
                data[36]           = ((unsigned char*)(&acc_raw_z))[0];   // Z
                data[37]           = ((unsigned char*)(&acc_raw_z))[1];   // Z
                data[38]           = ((unsigned char*)(&acc_raw_z))[2];   // Z
                data[39]           = ((unsigned char*)(&acc_raw_z))[3];   // Z
                data[40]           = 0x00;
                data[41]           = 0x00;
                data[42]           = 0x00;
                data[43]           = 0x00;
                data[44]           = 0x00;
                data[45]           = 0x00;
                data[46]           = 0x00;
                data[47]           = 0x00;
                data[48]           = 0x00;
                data[49]           = 0x00;
                data[50]           = 0x00;
                data[51]           = 0x00;
                data[52]           = 0x00;
                data[53]           = 0x00;
                data[54]           = 0x00;
                data[55]           = 0x00;
                data[56]           = 0x01;
                data[57]           = 0x01;
                data[58]           = 0x32;
                data[59]           = 0x32;
                data[60]           = 0x54;
                data[61]           = 0x6F;
                data[62]           = 0x43;
                unsigned char temp = '\0';
                for (int i = 0; i < 63; i++)
                    temp += data[i];
                data[63] = temp;
                imu_sock_ptr_->Send(data, 64);
            }

            void CanetProcessorStage::OnMessage(const void* data, size_t size) {
                uint8_t pr[size] = {0};
                memcpy(&pr, data, size);
                size_t can_frame_size = 0;
                uint8_t* p            = pr;

                if (params_.canet_port == 7000) {
                    if (size % 16 == 0)
                        can_frame_size = size / 16 - 1;
                    else {
                        return;
                    }

                    for (int i = 1; i <= can_frame_size; ++i) {
                        p += i * 16;   // 16位一个can数据
                        uint16_t dataLen = p[2] << 8 | p[3];
                        if (dataLen >= 8) {
                            can_msgs pCan;
                            ConvertUdpToCan(p, &pCan);
                            ParseCanData(&pCan);
                        } else {
                            AWARN_F("received data, but no XCMG can frame!");
                        }
                    }
                } else if (params_.canet_port == 7001) {
                    if (size % 13 == 0)
                        can_frame_size = size / 13;
                    else {
                        return;
                    }

                    for (int i = 0; i < can_frame_size; ++i) {
                        p += i * 13;
                        uint8_t dataLen = p[0] & 0x0F;
                        if ((p[0] & 0x30) == 0x00) {
                            can_msgs pCan;
                            ConvertUdpToCan(p, &pCan);
                            // LOG_F(INFO, "eceive can frame from CANNET: 0x%x",
                            // pCan.id);
                            ParseCanData(&pCan);
                        } else {
                            AWARN_F("received data, but no BDCA can frame!");
                        }
                    }
                } else {
                    AERROR_F("Error canet port, can't parse message, please "
                             "check it !!!");
                }
            }

            void CanetProcessorStage::ParseCanData(const can_msgs* c) {
                unsigned char* euler_xc   = (unsigned char*)&euler_x_;
                unsigned char* euler_yc   = (unsigned char*)&euler_y_;
                unsigned char* euler_zc   = (unsigned char*)&euler_z_;
                unsigned char* acc_raw_xc = (unsigned char*)&acc_raw_x_;
                unsigned char* acc_raw_yc = (unsigned char*)&acc_raw_y_;
                unsigned char* acc_raw_zc = (unsigned char*)&acc_raw_z_;

                if (params_.vehicle_type == "gr5505") {
                    switch (c->id) {
                    case 0x26D:
                        ADEBUG_F("receive id: 0x26D");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        // pb_grader_key_status_ptr->set_high_light_switch(c->data[0]&0x07);
                        data_.grader_can_status_ptr->set_overload_switch(
                            (c->data[4] & 0x3F) == 0x3F);
                        data_.grader_can_status_ptr
                            ->set_dipped_headlight_switch(c->data[1] & 0x07);
                        data_.grader_can_status_ptr->set_position_light_switch(
                            c->data[1] & 0x07);
                        data_.grader_can_status_ptr->set_rearlight_switch(
                            c->data[3] >> 3 & 0x07);
                        data_.grader_can_status_ptr
                            ->set_grader_rearlight_switch(c->data[3] >> 3 &
                                                          0x07);
                        data_.grader_can_status_ptr->set_cab_headlight_switch(
                            c->data[1] >> 3 & 0x07);
                        break;

                    case 0x26E:
                        ADEBUG_F("receive id: 0x26E");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_engine_fan_reverse_switch(c->data[0] >> 3 &
                                                            0x07);
                        data_.grader_can_status_ptr
                            ->set_centralized_lubrication_switch(c->data[0] &
                                                                 0x07);
                        break;
                    case 0x181:
                        ADEBUG_F("receive id: 0x181");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        acc_raw_xc[0] = (unsigned char)c->data[0];
                        acc_raw_xc[1] = (unsigned char)c->data[1];
                        acc_raw_xc[2] = (unsigned char)c->data[2];
                        acc_raw_xc[3] = (unsigned char)c->data[3];
                        acc_raw_yc[0] = (unsigned char)c->data[4];
                        acc_raw_yc[1] = (unsigned char)c->data[5];
                        acc_raw_yc[2] = (unsigned char)c->data[6];
                        acc_raw_yc[3] = (unsigned char)c->data[7];
                        data_.grader_can_status_ptr->mutable_imu_data()
                            ->set_accrawx(acc_raw_x_);
                        data_.grader_can_status_ptr->mutable_imu_data()
                            ->set_accrawy(acc_raw_y_);
                        break;
                    case 0x281:
                        ADEBUG_F("receive id: 0x281");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        acc_raw_zc[0] = (unsigned char)c->data[0];
                        acc_raw_zc[1] = (unsigned char)c->data[1];
                        acc_raw_zc[2] = (unsigned char)c->data[2];
                        acc_raw_zc[3] = (unsigned char)c->data[3];
                        euler_xc[0]   = (unsigned char)c->data[4];
                        euler_xc[1]   = (unsigned char)c->data[5];
                        euler_xc[2]   = (unsigned char)c->data[6];
                        euler_xc[3]   = (unsigned char)c->data[7];
                        data_.grader_can_status_ptr->mutable_imu_data()
                            ->set_accrawz(acc_raw_z_);
                        data_.grader_can_status_ptr->mutable_imu_data()
                            ->set_eulerx(-euler_x_);
                        break;
                    case 0x381:
                        ADEBUG_F("receive id: 0x381");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        euler_yc[0] = (unsigned char)c->data[0];
                        euler_yc[1] = (unsigned char)c->data[1];
                        euler_yc[2] = (unsigned char)c->data[2];
                        euler_yc[3] = (unsigned char)c->data[3];
                        euler_zc[0] = (unsigned char)c->data[4];
                        euler_zc[1] = (unsigned char)c->data[5];
                        euler_zc[2] = (unsigned char)c->data[6];
                        euler_zc[3] = (unsigned char)c->data[7];
                        data_.grader_can_status_ptr->mutable_imu_data()
                            ->set_eulery(euler_y_);
                        data_.grader_can_status_ptr->mutable_imu_data()
                            ->set_eulerz(euler_z_);
                        break;
                    case 0x481:
                        ADEBUG_F("receive id: 0x481");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        break;
                    case 0x781:
                        ADEBUG_F("receive id: 0x781");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        break;
                    case 0x0CF00300:
                        ADEBUG_F("receive data ID: 0x0CF00300");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_throttle_pedal_low_idle_switch(
                                c->data[0] >> 0 & 0x03);   // 油门踏板低怠速开关
                        data_.grader_can_status_ptr
                            ->set_throttle_pedal_forced_downshift_switch(
                                c->data[0] >> 2 &
                                0x03);   // 油门踏板强制降档开关
                        data_.grader_can_status_ptr->set_speed_limit_status(
                            c->data[0] >> 4 & 0x03);   // 速度限制状态
                        data_.grader_can_status_ptr->set_throttle_value(
                            (c->data[1]) * 0.4);   // 油门当前值
                        data_.grader_can_status_ptr
                            ->set_percentage_of_load_at_current_speed(
                                (c->data[2]) * 1.0);   // 当前转速下负荷百分比
                        data_.grader_can_status_ptr
                            ->set_remote_throttle_pedal_position(
                                c->data[3] * 0.4);   // 远程油门踏板位置
                        data_.grader_can_status_ptr
                            ->set_actual_maximum_available_engine_rated_torque(
                                c->data[3] *
                                0.4);   // 实际最大可用发动机额定扭矩
                        break;
                    case 0x0CF00400:
                        ADEBUG_F("receive data ID: 0x0CF00400");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_engine_torque_models(
                            c->data[0] & 0x0F);   // 发动机扭矩模式
                        data_.grader_can_status_ptr
                            ->set_percentage_of_driving_command_torque(
                                c->data[1] - 125);   // 驾驶指令百分比扭矩
                        data_.grader_can_status_ptr
                            ->set_percentage_of_engine_actual_torque(
                                (c->data[2]) - 125);   // 发动机实际扭矩百分比
                        data_.grader_can_status_ptr->set_engine_speed(
                            (c->data[3] | (c->data[4] << 8)) *
                            0.125);   // 发动机转速
                        data_.grader_can_status_ptr
                            ->set_control_engine_device_source_address(
                                c->data[5]);   // 控制发动机设备源地址
                        data_.grader_can_status_ptr->set_starter_model(
                            c->data[6] & 0x0F);   // 起动机模式
                        data_.grader_can_status_ptr
                            ->set_percentage_of_engine_demand_torque(
                                c->data[7]);   // 发动机需求扭矩百分比
                        break;
                    case 0x18FEEF00:
                        ADEBUG_F("receive data ID: 0x18FEEF00");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_fuel_pressure(
                            c->data[0] * 4);   // 燃油压力
                        data_.grader_can_status_ptr->set_engine_oil_level(
                            c->data[2] * 0.4);   // 机油液位
                        data_.grader_can_status_ptr
                            ->set_engine_lubricating_oil_pressure(
                                (c->data[3]) * 4);   // 发动机润滑油压力
                        data_.grader_can_status_ptr->set_coolant_level(
                            c->data[7] * 0.4);   // 冷却液液位
                        break;
                    case 0x18FEEE00:
                        ADEBUG_F("receive data ID: 0x18FEEE00");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_engine_water_temperature(
                                (c->data[0]) * 1 -
                                40);   // 发动机冷却液温度（水温）
                        data_.grader_can_status_ptr->set_fuel_temperature(
                            c->data[1] - 41);   // 燃油温度
                        data_.grader_can_status_ptr->set_oil_temperature(
                            (c->data[2] | c->data[3] << 8) * 0.03125 -
                            273);   // 机油温度
                        break;
                    case 0x18FEF200:
                        ADEBUG_F("receive data ID: 0x18FEF200");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_fuel_consumption_rate(
                            (c->data[0] | (c->data[1] << 8)) *
                            0.05);   // 燃油消耗速率
                        data_.grader_can_status_ptr
                            ->set_instantaneous_fuel_consumption(
                                (c->data[2] | c->data[3] << 8) *
                                0.001953125);   // 瞬时油耗
                        data_.grader_can_status_ptr->set_average_fuel_economy(
                            (c->data[4] | c->data[5] << 8) *
                            0.001953125);   // 平均燃油经济性
                        break;
                    case 0x18FEF600:
                        ADEBUG_F("receive data ID: 0x18FEF600");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_relative_pressurization_pressure(
                                c->data[1] * 2);   // 相对增压压力
                        data_.grader_can_status_ptr
                            ->set_intake_manifold_temperature(
                                (c->data[2]) * 1 - 40);   // 进气歧管温度
                        data_.grader_can_status_ptr
                            ->set_absolute_pressurization_pressure(
                                c->data[3] * 2);   // 绝对增压压力
                        data_.grader_can_status_ptr->set_exhaust_temperature(
                            (c->data[5] | c->data[6] << 8) *
                            0.03125);   // 排气温度
                        break;
                    case 0x18FEE900:
                        ADEBUG_F("receive data ID: 0x18FEE900");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_total_fuel_usage(
                            ((c->data[4] | (c->data[5] << 8) |
                              (c->data[6] << 16) | (c->data[7] << 24)) *
                             0.5));   // 燃料使用总量
                        break;
                    case 0x18FECB00:
                        ADEBUG_F("receive data ID: 0x18FECB00");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_protection_lamp_statu(
                            c->data[0] >> 0 & 0x03);   // 保护灯状态
                        data_.grader_can_status_ptr
                            ->set_environmental_warning_lamp_statu(
                                c->data[0] >> 2 & 0x03);   // 环境警告灯状态
                        data_.grader_can_status_ptr->set_red_stop_lamp_statu(
                            c->data[0] >> 4 & 0x03);   // 红色停止灯状态
                        data_.grader_can_status_ptr->set_mil_lamp_statu(
                            c->data[0] >> 6 & 0x03);   // MIL灯状态
                        data_.grader_can_status_ptr->set_spn(
                            (c->data[2] | c->data[3] << 8));   // SPN
                        data_.grader_can_status_ptr->set_fmi_code(
                            c->data[4] & 0x1F);   // FMI码
                        data_.grader_can_status_ptr->set_spn_msb(
                            c->data[4] >> 5 & 0x07);   // SPN_MSB
                        data_.grader_can_status_ptr->set_current_fault_count(
                            c->data[5] & 0x7F);   // 当前故障计数
                        data_.grader_can_status_ptr->set_spn_transform_model(
                            c->data[5] >> 7 & 0x01);   // SPN转换模式
                        break;
                    case 0x18ECFF00:
                        ADEBUG_F("receive data ID: 0x18FECB00");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_control_byte(
                            c->data[0]);   // 控制字节
                        data_.grader_can_status_ptr
                            ->set_total_information_low_byte(
                                c->data[1]);   // 总信息字节数（低字节）
                        data_.grader_can_status_ptr
                            ->set_total_information_high_byte(
                                c->data[2]);   // 总信息字节数（高字节）
                        data_.grader_can_status_ptr
                            ->set_total_number_of_packets(
                                c->data[3]);   // 总包数
                        data_.grader_can_status_ptr->set_ff(c->data[4]);   // FF
                        data_.grader_can_status_ptr->set_pgn_dm(
                            (c->data[5] | (c->data[6] << 8) |
                             (c->data[7] << 16)));   // PGN,DM
                        break;
                    case 0x18FEE500:
                        ADEBUG_F("receive data ID: 0x18ECFF00");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_total_engine_operating_time(
                                ((c->data[0] | (c->data[1] << 8) |
                                  (c->data[2] << 16) | (c->data[3] << 24)) *
                                 0.05));   // 总的发动机工作时间
                        data_.grader_can_status_ptr
                            ->set_cumulative_engine_revolutions(
                                ((c->data[4] | (c->data[5] << 8) |
                                  (c->data[6] << 16) | (c->data[7] << 24)) *
                                 1000));   // 发动机累计转数
                        break;

                    case 0x18FECA00:
                        ADEBUG_F("receive data ID: 0x18FECA00");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_engine_error_protection_lamp_statu(
                                c->data[0] >> 0 &
                                0x03);   // 发动机故障-保护灯状态
                        data_.grader_can_status_ptr
                            ->set_engine_error_environmental_warning_lamp_statu(
                                c->data[0] >> 2 &
                                0x03);   // 发动机故障-环境警告灯状态
                        data_.grader_can_status_ptr
                            ->set_engine_error_red_stop_lamp_statu(
                                c->data[0] >> 4 &
                                0x03);   // 发动机故障-红色停止灯状态
                        data_.grader_can_status_ptr
                            ->set_engine_error_mil_lamp_statu(
                                c->data[0] >> 6 &
                                0x03);   // 发动机故障-MIL灯状态
                        data_.grader_can_status_ptr
                            ->set_engine_error_spn_first_byte(
                                c->data[2]);   // SPN第一个字节
                        data_.grader_can_status_ptr
                            ->set_engine_error_spn_second_byte(
                                c->data[3]);   // SPN第二个字节
                        data_.grader_can_status_ptr->set_spn_msb(
                            c->data[4] >> 5);   // SPN MSB
                        data_.grader_can_status_ptr->set_fmi_code(
                            c->data[4] & 0x1f);   // FMI码
                        data_.grader_can_status_ptr
                            ->set_engine_error_spn_transform_model(
                                c->data[5] >> 7 &
                                0x01);   // 发动机故障-SPN转换模式
                        data_.grader_can_status_ptr
                            ->set_engine_error_current_fault_count(
                                c->data[5] & 0x7F);   // 发动机故障-当前故障计数
                        break;
                    case 0x0CFF3003:
                        ADEBUG_F("receive data ID: 0x0CFF3003");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_transmission_direction_back_feed(
                                c->data[1] & 0x03);   // 变速器方向回送
                        data_.grader_can_status_ptr
                            ->set_sub_transmission_direction_back_feed(
                                c->data[1] >> 2 & 0x0F);   // 副变速器方向回送
                        data_.grader_can_status_ptr
                            ->set_torque_converter_oil_temperature(
                                c->data[4] - 50);   // 变矩器油温
                        data_.grader_can_status_ptr
                            ->set_torque_converter_oil_pressure(
                                ((c->data[6]) - 100 > 0 ? 100 : (c->data[6])) *
                                    0.1 +
                                ((c->data[6]) - 200 > 0
                                     ? 100
                                     : ((c->data[6]) - 100 > 0
                                            ? (c->data[6]) - 100
                                            : 0) *
                                           0.2) +
                                ((c->data[6]) > 200 ? (c->data[6]) - 200 : 0) *
                                    1);   // 变矩器油压
                        data_.grader_can_status_ptr->set_speed_information(
                            (c->data[5]) <= 100
                                ? (c->data[5]) * 0.1
                                : ((c->data[5]) <= 200
                                       ? ((c->data[5]) - 100) * 0.2 + 10
                                       : 30 + (c->data[5]) -
                                             200));   // 车速信息
                        break;
                    case 0x18FF1E03:
                        ADEBUG_F("receive data ID: 0x18FF1E03");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_transmission_fault_code_one(
                                c->data[4]);   // 变速箱故障代码
                        data_.grader_can_status_ptr
                            ->set_indicator_gears_forward(c->data[6] &
                                                          0x0F);   // 指示档位
                        data_.grader_can_status_ptr->set_gear_direction_forward(
                            c->data[6] & 0x30 >> 4);   // 档位方向
                        break;
                    case 0x0CFF3103:
                        ADEBUG_F("receive data ID: 0x0CFF3103");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_gear_code(
                            c->data[0]);   // 档位代码
                        data_.grader_can_status_ptr
                            ->set_reply_to_clutch_separation_request(
                                c->data[1] >> 0 & 0x03);   // 离合分离请求的回复
                        data_.grader_can_status_ptr
                            ->set_reply_of_parking_braking_state(
                                c->data[1] >> 2 & 0x03);   // 驻车制动状态的回复
                        data_.grader_can_status_ptr
                            ->set_neutral_lock_function_statu(
                                c->data[1] >> 4 & 0x03);   // 空挡锁定功能状态
                        data_.grader_can_status_ptr
                            ->set_current_functional_status_of_operator(
                                c->data[1] >> 6 & 0x03);   // 操作员当前功能状态
                        data_.grader_can_status_ptr
                            ->set_auto_manual_mode_function_status(
                                c->data[2] >> 4 &
                                0x03);   // 自动/手动模式功能状态
                        data_.grader_can_status_ptr->set_load_detect_status(
                            c->data[2] >> 6 & 0x03);   // 加载/未加载检测回复
                        data_.grader_can_status_ptr
                            ->set_forced_downshift_request(
                                c->data[3] >> 0 & 0x03);   // 强制降档请求
                        data_.grader_can_status_ptr
                            ->set_four_or_two_wd_function_status(
                                c->data[3] >> 2 & 0x03);   // 4WD/2WD功能状态
                        data_.grader_can_status_ptr
                            ->set_forced_downshift_function_status(
                                c->data[3] >> 4 & 0x03);   // 强制降档功能状态
                        data_.grader_can_status_ptr
                            ->set_disable_shift_function_status(
                                c->data[3] >> 6 & 0x03);   // 禁止换档功能状态
                        data_.grader_can_status_ptr
                            ->set_seat_positioning_function_status(
                                c->data[4] >> 0 & 0x03);   // 座椅定位功能状态
                        data_.grader_can_status_ptr
                            ->set_throttle_pedal_position_free(
                                c->data[4] >> 2 &
                                0x03);   // 油门踏板位置（空闲/不空闲）
                        data_.grader_can_status_ptr
                            ->set_throttle_pedal_position_full(
                                c->data[4] >> 6 &
                                0x03);   // 油门踏板位置（全/半油门）
                        data_.grader_can_status_ptr->set_manual_lock_request(
                            c->data[5] >> 0 & 0x03);   // 手动锁定请求
                        data_.grader_can_status_ptr
                            ->set_engine_high_idle_speed_request(
                                c->data[5] >> 2 & 0x03);   // 发动机高怠速请求
                        data_.grader_can_status_ptr
                            ->set_choice_of_high_and_low_range(
                                c->data[5] >> 4 & 0x03);   // 高/低范围的请求
                        data_.grader_can_status_ptr
                            ->set_redundant_security_gap_request(
                                c->data[5] >> 6 & 0x03);   // 冗余安全空挡请求
                        data_.grader_can_status_ptr->set_system_pressure_status(
                            c->data[6] >> 0 & 0x03);   // 系统压力状态
                        data_.grader_can_status_ptr->set_driving_brake_status(
                            c->data[6] >> 2 & 0x03);   // 行车制动器状态
                        data_.grader_can_status_ptr
                            ->set_block_the_request_for_the_highest_gear(
                                c->data[6] >> 4 & 0x03);   // 封锁最高档位请求
                        data_.grader_can_status_ptr
                            ->set_converter_output_temperature_state(
                                c->data[6] >> 6 & 0x03);   // 转换器输出温度状态
                        data_.grader_can_status_ptr
                            ->set_exhaust_braking_condition_detection(
                                c->data[7] >> 0 & 0x03);   // 排气制动状态检测
                        data_.grader_can_status_ptr
                            ->set_reducer_condition_detection(
                                c->data[7] >> 2 & 0x03);   // 减速器状态检测
                        data_.grader_can_status_ptr->set_alarm_reverse(
                            c->data[7] >> 4 & 0x03);   // 反向报警
                        break;
                    case 0x0CFF3203:
                        ADEBUG_F("receive data ID: 0x0CFF3203");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_throttle_pedal_position(
                                c->data[0] * 0.4);   // 油门踏板位置
                        data_.grader_can_status_ptr->set_brake_pedal_position(
                            c->data[1] * 0.4);   // 制动踏板位置
                        data_.grader_can_status_ptr->set_engine_turn_speed(
                            (c->data[5] | c->data[6] << 8) *
                            0.125);   // 发动机转速
                        break;
                    case 0x0CFF3303:
                        ADEBUG_F("receive data ID: 0x0CFF3303");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_dana_fault_area(
                            c->data[1]);   // DANA Fault area
                        data_.grader_can_status_ptr->set_dana_fault_type(
                            c->data[2]);   // DANA Fault Type
                        break;

                    case 0x0CFF2021:
                        ADEBUG_F("receice data ID: 0x)CFF2021");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_gearbox_gear_size(
                            c->data[0] >> 2 & 0x3F);   // 变速箱档位大小
                        data_.grader_can_status_ptr->set_gearbox_gear_direction(
                            c->data[0] & 0x03);   // 变速箱档位方向
                        data_.grader_can_status_ptr->set_parking_signal(
                            c->data[1] >> 2 & 0x01);   // 驻车信号
                        data_.grader_can_status_ptr
                            ->set_manual_and_automatic_selection(
                                c->data[2]);   // 手动自动选择
                        break;
                    case 0x18FF0001:
                        ADEBUG_F("receive data ID: 0x18FF0001");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_hydraulic_oil_temperature_high_alarm_lamp(
                                (c->data[0] >> 0) & 0x01);   // 液压油温高报警灯
                        data_.grader_can_status_ptr
                            ->set_gearbox_oil_temperature_alarm_lamp(
                                (c->data[0] >> 1) & 0x01);   // 变速箱油温报警灯
                        data_.grader_can_status_ptr
                            ->set_handle_disconnection_alarm(
                                (c->data[0] >> 2) & 0x01);   // 手柄断线报警
                        data_.grader_can_status_ptr
                            ->set_gps_communication_status(
                                (c->data[0] >> 3) & 0x01);   // gps通信状态
                        data_.grader_can_status_ptr
                            ->set_left_handle_communication_status(
                                (c->data[0] >> 4) & 0x01);   // 左手柄通信状态
                        data_.grader_can_status_ptr
                            ->set_right_handle_communication_status(
                                (c->data[0] >> 5) & 0x01);   // 有手柄通信状态
                        data_.grader_can_status_ptr
                            ->set_can_line_panel_communication_status(
                                (c->data[0] >> 6) &
                                0x01);   // can线面板通信状态
                        data_.grader_can_status_ptr->set_fuel_level_alarm(
                            (c->data[0] >> 7) & 0x01);   // 燃油油位报警

                        data_.grader_can_status_ptr
                            ->set_left_lift_cylinder_lift_status(
                                (c->data[1] >> 0) & 0x01);   // 左提升油缸升
                        data_.grader_can_status_ptr
                            ->set_left_lift_cylinder_drop_status(
                                (c->data[1] >> 1) & 0x01);   // 左提升油缸降
                        data_.grader_can_status_ptr
                            ->set_right_lift_cylinder_lift_status(
                                (c->data[1] >> 2) & 0x01);   // 右提升油缸升
                        data_.grader_can_status_ptr
                            ->set_right_lift_cylinder_drop_status(
                                (c->data[1] >> 3) & 0x01);   // 右提升油缸降
                        data_.grader_can_status_ptr
                            ->set_front_wheel_inclines_to_the_left_status(
                                (c->data[1] >> 4) & 0x01);   // 前轮左倾
                        data_.grader_can_status_ptr
                            ->set_front_wheel_inclines_to_the_right_status(
                                (c->data[1] >> 5) & 0x01);   // 前轮右倾
                        data_.grader_can_status_ptr
                            ->set_front_wheel_turn_left_status(
                                (c->data[1] >> 6) & 0x01);   // 前轮左转
                        data_.grader_can_status_ptr
                            ->set_front_wheel_turn_right_status(
                                (c->data[1] >> 7) & 0x01);   // 前轮右转

                        data_.grader_can_status_ptr
                            ->set_slewing_support_turns_clockwise_status(
                                (c->data[2] >> 0) & 0x01);   // 回转支撑顺转
                        data_.grader_can_status_ptr
                            ->set_slewing_support_turns_counterwise_status(
                                (c->data[2] >> 1) & 0x01);   // 回转支撑逆转
                        data_.grader_can_status_ptr
                            ->set_left_swing_of_shovel_knife_status(
                                (c->data[2] >> 2) & 0x01);   // 铲刀左摆
                        data_.grader_can_status_ptr
                            ->set_right_swing_of_shovel_knife_status(
                                (c->data[2] >> 3) & 0x01);   // 铲刀右摆
                        data_.grader_can_status_ptr->set_shovel_angle_status(
                            (c->data[2] >> 4) & 0x01);   // 铲土角俯角
                        data_.grader_can_status_ptr
                            ->set_shovel_angle_elevation_status(
                                (c->data[2] >> 5) & 0x01);   // 铲土角仰角
                        data_.grader_can_status_ptr
                            ->set_hinged_left_turn_status((c->data[2] >> 6) &
                                                          0x01);   // 铰接左转
                        data_.grader_can_status_ptr
                            ->set_hinged_right_turn_status((c->data[2] >> 7) &
                                                           0x01);   // 铰接右转

                        data_.grader_can_status_ptr
                            ->set_shovel_knife_left_lead_out_status(
                                (c->data[3] >> 0) & 0x01);   // 铲刀左引出
                        data_.grader_can_status_ptr
                            ->set_shovel_knife_right_lead_out_status(
                                (c->data[3] >> 1) & 0x01);   // 铲刀右引出
                        data_.grader_can_status_ptr->set_forward_push_up_status(
                            (c->data[3] >> 2) & 0x01);   // 前推升
                        data_.grader_can_status_ptr
                            ->set_forward_push_down_status((c->data[3] >> 3) &
                                                           0x01);   // 前推降
                        data_.grader_can_status_ptr->set_after_loose_up_status(
                            (c->data[3] >> 4) & 0x01);   // 后松升
                        data_.grader_can_status_ptr
                            ->set_after_loose_down_status((c->data[3] >> 5) &
                                                          0x01);   // 后松降
                        data_.grader_can_status_ptr
                            ->set_proportional_output_of_temperature_control_fan_system_status(
                                (c->data[3] >> 6) &
                                0x01);   // 温控风扇系统比例输出
                        data_.grader_can_status_ptr
                            ->set_turn_control_signal_status(
                                (c->data[3] >> 7) & 0x01);   // 转向控制信号

                        data_.grader_can_status_ptr
                            ->set_transmission_fault_code_one(
                                c->data[4]);   // 变速箱故障代码1
                        data_.grader_can_status_ptr
                            ->set_indicator_gears_forward(
                                (c->data[5]) & 0x0F);   // 指示档位(转发)
                        data_.grader_can_status_ptr->set_gear_direction_forward(
                            (c->data[5] >> 4) & 0x03);   // 档位方向(转发)
                        data_.grader_can_status_ptr
                            ->set_auto_manual_switch_forward(
                                (c->data[5] >> 6) &
                                0x01);   // 手动自动切换(转发)
                        data_.grader_can_status_ptr
                            ->set_over_speed_handle_steering_alarm(
                                (c->data[5] >> 7) & 0x01);   // 超速手柄转向报警
                        data_.grader_can_status_ptr
                            ->set_fault_lubrication_centralized_alarm(
                                (c->data[6] >> 0) &
                                0x01);   // 集中润滑故障报警灯
                        data_.grader_can_status_ptr
                            ->set_transmission_oil_level_alarm(
                                (c->data[6] >> 1) & 0x01);   // 变速箱油位报警
                        data_.grader_can_status_ptr
                            ->set_excessive_intercooling_temperature(
                                (c->data[6] >> 2) & 0x01);   // 中冷温度过高
                        data_.grader_can_status_ptr->set_brake_system_alarm(
                            (c->data[6] >> 3) & 0x01);   // 制动系统报警
                        data_.grader_can_status_ptr
                            ->set_transmission_alarm_light(
                                (c->data[6] >> 4) & 0x01);   // 变速箱报警灯
                        data_.grader_can_status_ptr->set_speed(
                            c->data[7]);   // 车辆速度
                        break;
                    case 0x18FF0002:
                        ADEBUG_F("receive data ID: 0x18FF0002");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_system_voltage(
                            (c->data[0] | (c->data[1] << 8)) *
                            0.1);   // 系统电压
                        data_.grader_can_status_ptr->set_fuel_level(
                            c->data[2]);   // 燃油位
                        data_.grader_can_status_ptr->set_hinge_angle_indication(
                            (c->data[3] | (c->data[4] << 8)) *
                            0.1);   // 铰接角度指示
                        data_.grader_can_status_ptr->set_odometry(
                            (c->data[5] | (c->data[6] << 8) |
                             (c->data[7] << 16)) *
                            0.125);   // 车辆里程
                        break;
                    case 0x18FF0003:
                        ADEBUG_F("receive data ID: 0x18FF0003");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_shovel_floating_indicator(
                                (c->data[0] >> 0) & 0x01);   // 铲刀浮动指示灯
                        data_.grader_can_status_ptr->set_fan_reversal_alarm(
                            (c->data[0] >> 1) & 0x01);   // 风扇反转报警
                        data_.grader_can_status_ptr
                            ->set_hinged_back_in_progress(
                                (c->data[0] >> 2) & 0x01);   // 铰接回中进行中
                        data_.grader_can_status_ptr->set_hinged_back_succeed(
                            (c->data[0] >> 3) & 0x01);   // 铰接回中完成
                        data_.grader_can_status_ptr->set_hinged_back_fail(
                            (c->data[0] >> 4) & 0x01);   // 铰接回中失败
                        data_.grader_can_status_ptr
                            ->set_hydraulic_tool_lock_indicator(
                                (c->data[0] >> 5) &
                                0x01);   // 液压机具闭锁指示灯
                        data_.grader_can_status_ptr
                            ->set_forced_closing_hydraulic_action(
                                (c->data[0] >> 6) & 0x01);   // 强制关闭液压动作
                        data_.grader_can_status_ptr
                            ->set_charging_indicator_status(
                                (c->data[0] >> 7) & 0x01);   // 充电指示灯
                        data_.grader_can_status_ptr
                            ->set_engine_communication_status(
                                (c->data[1] >> 0) & 0x01);   // 发动机通信状态
                        data_.grader_can_status_ptr
                            ->set_transmission_communication_status(
                                (c->data[1] >> 1) & 0x01);   // 变速箱通信状态
                        data_.grader_can_status_ptr
                            ->set_centralized_lubrication_of_working_indicator_light(
                                (c->data[1] >> 2) & 0x01);   // 集中润滑工作指示

                        data_.grader_can_status_ptr
                            ->set_emergency_turn_indicator(
                                (c->data[1] >> 3) &
                                0x01);   // 紧急转向指示灯/转向开环模式
                        data_.grader_can_status_ptr
                            ->set_engine_speed_over_speed_alarm_lamp(
                                (c->data[1] >> 4) &
                                0x01);   // 发动机转速超速报警灯
                        data_.grader_can_status_ptr
                            ->set_winding_ladder_did_not_retract_alarm_lamp(
                                (c->data[1] >> 5) & 0x01);   // 旋梯未收回报警灯
                        data_.grader_can_status_ptr
                            ->set_high_water_temperature_alarm_lamp(
                                (c->data[1] >> 6) & 0x01);   // 水温过高报警灯
                        data_.grader_can_status_ptr
                            ->set_low_oil_pressure_alarm_lamp(
                                (c->data[1] >> 7) &
                                0x01);   // 机油压力过低报警灯
                        data_.grader_can_status_ptr
                            ->set_torque_converter_oil_temperature_forward(
                                c->data[2] - 40);   // 变矩器油温

                        data_.grader_can_status_ptr->set_park_warning_light(
                            (c->data[3] >> 0) & 0x01);   // 驻车报警灯
                        data_.grader_can_status_ptr
                            ->set_handle_steering_enable_indicator(
                                (c->data[3] >> 1) &
                                0x01);   // 手柄转向使能指示灯
                        data_.grader_can_status_ptr
                            ->set_dust_removal_indicator_for_fan(
                                (c->data[3] >> 2) & 0x01);   // 风扇除尘指示灯
                        data_.grader_can_status_ptr
                            ->set_throttle_lock_indicator(
                                (c->data[3] >> 3) & 0x01);   // 油门锁定指示灯
                        data_.grader_can_status_ptr->set_turn_left_lamp_status(
                            (c->data[3] >> 4) & 0x01);   // 左转向灯
                        data_.grader_can_status_ptr->set_high_beam_status(
                            (c->data[3] >> 5) & 0x01);   // 远光灯
                        data_.grader_can_status_ptr->set_high_light_switch(
                            c->data[3] >> 5 & 0x01);
                        data_.grader_can_status_ptr->set_turn_right_lamp_status(
                            (c->data[3] >> 6) & 0x01);   // 右转向灯
                        data_.grader_can_status_ptr
                            ->set_oil_return_filter_clogging_alarm_status(
                                (c->data[3] >> 7) &
                                0x01);   // 回油滤油器堵塞报警

                        data_.grader_can_status_ptr
                            ->set_oil_suction_filter_clogging_alarm(
                                (c->data[4] >> 0) &
                                0x01);   // 吸油滤油器堵塞报警
                        data_.grader_can_status_ptr
                            ->set_driving_brake_pressure_low_warning_light(
                                (c->data[4] >> 1) &
                                0x01);   // 行车制动压力低报警灯
                        data_.grader_can_status_ptr
                            ->set_engine_warm_up_indicator_status(
                                (c->data[4] >> 2) & 0x01);   // 发动机预热指示灯
                        data_.grader_can_status_ptr
                            ->set_hydraulic_oil_level_low_alarm_lamp_status(
                                (c->data[4] >> 3) &
                                0x01);   // 液压油油位低报警灯
                        data_.grader_can_status_ptr
                            ->set_air_filter_clogging_alarm_status(
                                (c->data[4] >> 4) & 0x01);   // 空滤器堵塞报警
                        data_.grader_can_status_ptr
                            ->set_oil_and_water_separator_alarm_status(
                                (c->data[4] >> 5) & 0x01);   // 油水分离报警
                        data_.grader_can_status_ptr
                            ->set_transmission_oil_pressure_low_warning_light_status(
                                (c->data[4] >> 6) &
                                0x01);   // 变速箱油压低报警灯
                        data_.grader_can_status_ptr
                            ->set_coolant_level_low_warning_light_status(
                                (c->data[4] >> 7) &
                                0x01);   // 冷却液液位低报警灯

                        data_.grader_can_status_ptr
                            ->set_hydraulic_oil_temperature(c->data[5] -
                                                            40);   // 液压油温
                        data_.grader_can_status_ptr
                            ->set_back_feeding_depth_into_the_soil(
                                (c->data[6] | c->data[7]
                                                  << 8));   // 后送入土深度
                        break;
                    case 0x18FF0004:
                        ADEBUG_F("receive data ID: 0x18FF0004");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_transmission_system_pressure_forward(
                                c->data[0]);   //  变速箱系统压力(转发)

                        data_.grader_can_status_ptr->set_low_beam(
                            (c->data[1] >> 0) & 0x01);   // 近光灯
                        data_.grader_can_status_ptr->set_outline_lamp(
                            (c->data[1] >> 1) & 0x01);   // 示廓灯
                        data_.grader_can_status_ptr->set_can_bus_fault_alarm(
                            (c->data[1] >> 2) & 0x01);   // can总线故障报警
                        data_.grader_can_status_ptr
                            ->set_engine_waiting_for_start_indication(
                                (c->data[1] >> 3) &
                                0x01);   // 发动机等待启动指示
                        data_.grader_can_status_ptr
                            ->set_engine_protect_indication_lamp(
                                (c->data[1] >> 4) & 0x01);   // 发动机保护指示灯
                        data_.grader_can_status_ptr->set_diff_lock_indication(
                            (c->data[1] >> 5) & 0x01);   // 差速锁指示
                        data_.grader_can_status_ptr
                            ->set_accumulator_indication_lamp(
                                (c->data[1] >> 6) & 0x01);   // 蓄能器指示
                        data_.grader_can_status_ptr->set_speed_signal(
                            (c->data[2] | c->data[3] << 8));   // 车速信号
                        data_.grader_can_status_ptr
                            ->set_transmission_fault_codes_2(
                                (c->data[4]));   // 变速箱故障代码2

                        data_.grader_can_status_ptr
                            ->set_emergency_steering_pressure(
                                c->data[5]);   //  应急转向压力
                        // pbGraderCANStatusPtr->set_shovel_three_speed(c->data[6]);
                        // // 铲刀三速
                        data_.grader_can_status_ptr
                            ->set_engine_throttle_hold_auto_mode_on_indication(
                                (c->data[7] >> 0) &
                                0x01);   //  发动机油门保持自动模式开启指示
                        data_.grader_can_status_ptr
                            ->set_engine_throttle_hold_mode_setting_completion_indication(
                                (c->data[7] >> 1) &
                                0x01);   //  发动机油门保持模式设定完成指示
                        data_.grader_can_status_ptr
                            ->set_engine_throttle_hold_manual_mode_on_indication(
                                (c->data[7] >> 2) &
                                0x01);   //  发动机油门保持手动模式开启指示
                        data_.grader_can_status_ptr
                            ->set_transmission_blocking_status(
                                (c->data[7] >> 5) & 0x01);   //  变速箱闭锁状态
                        data_.grader_can_status_ptr
                            ->set_hydraulic_pin_pulling_in_place_status(
                                (c->data[7] >> 6) & 0x01);
                        data_.grader_can_status_ptr
                            ->set_driver_in_position_signal(
                                (c->data[7] >> 7) & 0x01);   //  驾驶员就位信号
                        break;

                    case 0x18FF0005:
                        ADEBUG_F("receive data ID: 0x18FF0005");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_port_failure_1_port(
                            c->data[0]);
                        data_.grader_can_status_ptr
                            ->set_port_failure_1_failure_mode(c->data[1]);
                        data_.grader_can_status_ptr->set_port_failure_2_port(
                            c->data[2]);
                        data_.grader_can_status_ptr
                            ->set_port_failure_2_failure_mode(c->data[3]);
                        data_.grader_can_status_ptr->set_port_failure_3_port(
                            c->data[4]);
                        data_.grader_can_status_ptr
                            ->set_port_failure_3_failure_mode(c->data[5]);
                        data_.grader_can_status_ptr->set_port_failure_4_port(
                            c->data[6]);
                        data_.grader_can_status_ptr
                            ->set_port_failure_4_failure_mode(c->data[7]);
                        break;
                    case 0x18FF0006:
                        ADEBUG_F("receive data ID: 0x18FF0006");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_port_failure_5_port(
                            c->data[0]);
                        data_.grader_can_status_ptr
                            ->set_port_failure_5_failure_mode(c->data[1]);
                        data_.grader_can_status_ptr->set_port_failure_6_port(
                            c->data[2]);
                        data_.grader_can_status_ptr
                            ->set_port_failure_6_failure_mode(c->data[3]);
                        data_.grader_can_status_ptr->set_port_failure_7_port(
                            c->data[4]);
                        data_.grader_can_status_ptr
                            ->set_port_failure_7_failure_mode(c->data[5]);
                        data_.grader_can_status_ptr->set_port_failure_8_port(
                            c->data[6]);
                        data_.grader_can_status_ptr
                            ->set_port_failure_8_failure_mode(c->data[7]);
                        break;

                    case 0x18FF1004:
                        ADEBUG_F("receive data ID: 0x18FF1004");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_turn_left_lamp(
                            (c->data[0] >> 0) & 0x01);   // 左转向灯
                        data_.grader_can_status_ptr->set_turn_right_lamp(
                            (c->data[0] >> 1) & 0x01);   // 右转向灯
                        data_.grader_can_status_ptr
                            ->set_oil_return_filter_clogging_alarm(
                                (c->data[0] >> 2) & 0x01);   // 回油滤油堵塞报警
                        data_.grader_can_status_ptr
                            ->set_engine_warm_up_indicator(
                                (c->data[0] >> 5) & 0x01);   // 发动机预热指示灯
                        data_.grader_can_status_ptr
                            ->set_hydraulic_oil_level_low_alarm_lamp(
                                (c->data[0] >> 6) &
                                0x01);   // 液压油油位低报警灯
                        data_.grader_can_status_ptr
                            ->set_air_filter_clogging_alarm(
                                (c->data[0] >> 7) & 0x01);   // 空滤器堵塞报警

                        data_.grader_can_status_ptr
                            ->set_oil_and_water_separator_alarm(
                                (c->data[1] >> 0) & 0x01);   // 油水分离报警
                        data_.grader_can_status_ptr
                            ->set_transmission_oil_pressure_low_warning_light(
                                (c->data[1] >> 1) &
                                0x01);   // 变速箱油压低报警灯
                        data_.grader_can_status_ptr
                            ->set_coolant_level_low_warning_light(
                                (c->data[1] >> 2) &
                                0x01);   // 冷却液液位低报警灯
                        data_.grader_can_status_ptr
                            ->set_emergency_steering_test_switch(
                                (c->data[1] >> 3) & 0x01);   // 应急转向测试开关
                        data_.grader_can_status_ptr
                            ->set_transmission_oil_level_switch(
                                (c->data[1] >> 4) & 0x01);   // 变速箱油位开关
                        data_.grader_can_status_ptr
                            ->set_differential_lock_indication(
                                (c->data[1] >> 5) & 0x01);   // 差速锁指示
                        data_.grader_can_status_ptr->set_positioning_signal(
                            (c->data[1] >> 6) & 0x01);   // 就位信号
                        data_.grader_can_status_ptr
                            ->set_hydraulic_pin_pulling_in_place(
                                (c->data[1] >> 7) & 0x01);   // 液力拔销就位

                        data_.grader_can_status_ptr
                            ->set_hydraulic_oil_temperature_sensor(
                                (c->data[2] | c->data[3]
                                                  << 8));   // 液压油温传感器
                        data_.grader_can_status_ptr->set_fuel_level_sensor(
                            (c->data[4] | c->data[5] << 8));   // 燃油油位传感器

                        data_.grader_can_status_ptr->set_accumulator_button(
                            (c->data[6] >> 0) & 0x01);   // 蓄能器按钮
                        data_.grader_can_status_ptr->set_cruise_mode_switch(
                            (c->data[6] >> 1) & 0x01);   // 巡航模式开关
                        data_.grader_can_status_ptr->set_stop_signal(
                            (c->data[6] >> 2) & 0x01);   // 刹车信号
                        data_.grader_can_status_ptr->set_accumulator_relay(
                            (c->data[6] >> 3) & 0x01);   // 蓄能器继电器
                        data_.grader_can_status_ptr->set_ladder_motor_relay(
                            (c->data[6] >> 4) & 0x01);   // 爬梯马达继电器
                        data_.grader_can_status_ptr->set_air_conditioning_relay(
                            (c->data[6] >> 5) & 0x01);   // 空调继电器
                        data_.grader_can_status_ptr->set_neutral_relay(
                            (c->data[6] >> 6) & 0x01);   // 空挡继电器
                        data_.grader_can_status_ptr
                            ->set_differential_lock_relay(
                                (c->data[6] >> 7) & 0x01);   // 差速锁继电器

                        data_.grader_can_status_ptr
                            ->set_handle_differential_lock_button(
                                (c->data[7] >> 0) & 0x01);   // 手柄按钮：差速锁
                        data_.grader_can_status_ptr
                            ->set_handle_shovel_three_speed_button(
                                (c->data[7] >> 1) &
                                0x01);   // 手柄按钮：铲刀三速
                        data_.grader_can_status_ptr
                            ->set_engine_throttle_manual_mode(
                                (c->data[7] >> 2) &
                                0x01);   // 发动机油门手动模式
                        data_.grader_can_status_ptr
                            ->set_engine_fixed_speed_setting(
                                (c->data[7] >> 3) & 0x01);   // 发动机定速设定
                        data_.grader_can_status_ptr
                            ->set_engine_throttle_auto_mode(
                                (c->data[7] >> 4) &
                                0x01);   // 发动机油门自动模式
                        data_.grader_can_status_ptr->set_save_energy_mode(
                            (c->data[7] >> 5) & 0x01);   // 节能模式
                        data_.grader_can_status_ptr
                            ->set_rocker_switch_throttle_recovery_button(
                                (c->data[7] >> 6) &
                                0x01);   // 翘板开关油门恢复按钮
                        data_.grader_can_status_ptr->set_shovel_floating_button(
                            (c->data[7] >> 7) & 0x01);   // 铲刀浮动按钮
                        break;
                    case 0x18FF1005:
                        ADEBUG_F("receive data ID: 0x18FF1005");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_parking_solenoid_valve(
                            (c->data[0] >> 0) & 0x01);   // 驻车电磁阀
                        data_.grader_can_status_ptr
                            ->set_steering_working_pressure_switch(
                                (c->data[0] >> 1) &
                                0x01);   // 转向器工作压力开关
                        data_.grader_can_status_ptr
                            ->set_parking_pressure_switch(
                                (c->data[0] >> 2) & 0x01);   // 驻车压力开关
                        data_.grader_can_status_ptr
                            ->set_hydraulic_machine_latching_switch(
                                (c->data[0] >> 3) & 0x01);   // 液压机具闭锁开关
                        data_.grader_can_status_ptr
                            ->set_left_handle_enabling_sensing(
                                (c->data[0] >> 4) & 0x01);   // 左手柄使能感应
                        data_.grader_can_status_ptr
                            ->set_right_handle_enabling_sensing(
                                (c->data[0] >> 5) & 0x01);   // 右手柄使能感应
                        data_.grader_can_status_ptr->set_turn_enable_button(
                            (c->data[0] >> 6) & 0x01);   // 转向使能按键
                        data_.grader_can_status_ptr
                            ->set_front_wheel_left_tilt_button(
                                (c->data[0] >> 7) & 0x01);   // 前轮左倾斜按键

                        data_.grader_can_status_ptr
                            ->set_front_wheel_right_tilt_button(
                                (c->data[1] >> 0) & 0x01);   // 前轮右倾斜按键
                        data_.grader_can_status_ptr->set_plus_gear_button(
                            (c->data[1] >> 1) & 0x01);   // 加档位按键
                        data_.grader_can_status_ptr->set_minus_gear_button(
                            (c->data[1] >> 2) & 0x01);   // 减档位按键
                        data_.grader_can_status_ptr
                            ->set_directional_selection_forward_button(
                                (c->data[1] >> 3) & 0x01);   // 方向选择向前按键
                        data_.grader_can_status_ptr
                            ->set_direction_selection_back_button(
                                (c->data[1] >> 4) & 0x01);   // 方向选择向后按键
                        data_.grader_can_status_ptr
                            ->set_shovel_left_swing_button(
                                (c->data[1] >> 5) & 0x01);   // 铲刀左摆动按键
                        data_.grader_can_status_ptr
                            ->set_shovel_right_swing_button(
                                (c->data[1] >> 6) & 0x01);   // 铲刀右摆动按键
                        data_.grader_can_status_ptr
                            ->set_articulated_back_to_center_button(
                                (c->data[1] >> 7) & 0x01);   // 铰接回中按键

                        data_.grader_can_status_ptr
                            ->set_transmission_switching_and_enable_button(
                                (c->data[2] >> 0) &
                                0x01);   // 变速箱切换及使能按键
                        data_.grader_can_status_ptr->set_charging_indicator(
                            (c->data[2] >> 2) & 0x01);   // 充电指示灯
                        data_.grader_can_status_ptr->set_high_beam(
                            (c->data[2] >> 3) & 0x01);   // 远光灯
                        data_.grader_can_status_ptr
                            ->set_centralized_lubricatio_switch(
                                (c->data[2] >> 4) & 0x01);   // 集中润滑开关
                        data_.grader_can_status_ptr
                            ->set_fan_dust_removal_switch(
                                (c->data[2] >> 5) & 0x01);   // 风扇除尘开关
                        data_.grader_can_status_ptr
                            ->set_temperature_control_fan_system_reversing_switch_solenoid_valve(
                                (c->data[2] >> 6) &
                                0x01);   // 温控风扇系统反转开关电磁阀

                        data_.grader_can_status_ptr->set_cab_light_relay(
                            (c->data[3] >> 0) & 0x01);   // 驾驶室灯继电器
                        data_.grader_can_status_ptr->set_rear_work_light_relay(
                            (c->data[3] >> 1) & 0x01);   // 后工作灯继电器
                        data_.grader_can_status_ptr->set_channel_light_relay(
                            (c->data[3] >> 2) & 0x01);   // 通道灯继电器
                        data_.grader_can_status_ptr->set_headlight_realy(
                            (c->data[3] >> 3) & 0x01);   //  前大灯继电器
                        data_.grader_can_status_ptr
                            ->set_headlight_auxiliary_light_relay(
                                (c->data[3] >> 4) &
                                0x01);   // 前大灯辅助灯继电器
                        data_.grader_can_status_ptr
                            ->set_rotary_alarm_light_relay_status(
                                (c->data[3] >> 5) & 0x01);   // 旋转报警灯继电器
                        data_.grader_can_status_ptr->set_repair_light_relay(
                            (c->data[3] >> 6) & 0x01);   // 维修灯继电器
                        data_.grader_can_status_ptr->set_emergency_signal_relay(
                            (c->data[3] >> 7) & 0x01);   // 紧急信号灯继电器

                        data_.grader_can_status_ptr->set_outline_light_realy(
                            (c->data[4] >> 0) & 0x01);   // 示廓灯继电器
                        data_.grader_can_status_ptr
                            ->set_rear_window_water_spray_relay(
                                (c->data[4] >> 1) & 0x01);   // 后窗喷水继电器
                        data_.grader_can_status_ptr
                            ->set_emergency_steering_relay(
                                (c->data[4] >> 2) & 0x01);   // 紧急转向继电器
                        data_.grader_can_status_ptr
                            ->set_centralized_lubrication_relay(
                                (c->data[4] >> 3) & 0x01);   // 集中润滑继电器
                        data_.grader_can_status_ptr
                            ->set_left_shovel_blade_floating_solenoid_valve(
                                (c->data[4] >> 4) & 0x01);   // 左铲刀浮动电磁阀
                        data_.grader_can_status_ptr
                            ->set_right_shovel_blade_floating_solenoid_valve(
                                (c->data[4] >> 5) & 0x01);   // 右铲刀浮动电磁阀
                        data_.grader_can_status_ptr
                            ->set_engine_communication_status_bus(
                                (c->data[4] >> 6) &
                                0x01);   // 发动机通信状态 总线故障
                        data_.grader_can_status_ptr
                            ->set_transmission_communication_status_bus(
                                (c->data[4] >> 7) &
                                0x01);   // 变速箱通信状态 总线故障

                        data_.grader_can_status_ptr
                            ->set_rear_loose_cylinder_sensor(
                                (c->data[5] | c->data[6] << 8) *
                                0.01);   // 后松油缸传感器

                        data_.grader_can_status_ptr->set_door_touch_switches(
                            (c->data[7] >> 0) & 0x01);   // 门碰开关
                        data_.grader_can_status_ptr
                            ->set_shovel_proximity_switch(
                                (c->data[7] >> 1) & 0x01);   // 铲刀接近开关
                        data_.grader_can_status_ptr
                            ->set_climbing_ladder_in_position_proximity_switch(
                                (c->data[7] >> 2) &
                                0x01);   // 爬梯上就位接近开关
                        data_.grader_can_status_ptr
                            ->set_centralized_lubrication_front_end_pressure_switch(
                                (c->data[7] >> 3) &
                                0x01);   // 集中润滑前端压力开关
                        data_.grader_can_status_ptr
                            ->set_centralized_lubrication_back_end_pressure_switch(
                                (c->data[7] >> 4) &
                                0x01);   // 集中润滑末端压力开关
                        data_.grader_can_status_ptr
                            ->set_ladder_climbing_buzzer_relay(
                                (c->data[7] >> 5) & 0x01);   // 爬梯蜂鸣器继电器
                        data_.grader_can_status_ptr
                            ->set_climbing_motor_switch_relay(
                                (c->data[7] >> 6) &
                                0x01);   // 爬梯马达开关电磁阀
                        data_.grader_can_status_ptr->set_engine_power_curve(
                            (c->data[7] >> 7) & 0x01);   // 发动机功率曲线
                        break;

                    case 0x18FF1006:
                        ADEBUG_F("receive data ID: 0x18FF1006");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_left_handle_x_axis_input_analog(
                                c->data[0] |
                                c->data[1] << 8);   // 左手柄x轴输入的模拟量
                        data_.grader_can_status_ptr
                            ->set_right_handle_x_axis_input_analog(
                                c->data[2] |
                                c->data[3] << 8);   // 右手柄x轴输入的模拟量
                        data_.grader_can_status_ptr
                            ->set_left_handle_y_axis_input_analog(
                                c->data[4] |
                                c->data[5] << 8);   // 左手柄x轴输入的模拟量
                        data_.grader_can_status_ptr
                            ->set_right_handle_y_axis_input_analog(
                                c->data[6] |
                                c->data[7] << 8);   // 右手柄x轴输入的模拟量
                        break;

                    case 0x18FF1007:
                        ADEBUG_F("receive data ID: 0x18FF1007");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_analog_input_by_pushing_forward_the_roller(
                                c->data[0] |
                                c->data[1] << 8);   // 前推滚轮输入的模拟量
                        data_.grader_can_status_ptr
                            ->set_analog_of_articulated_steering_roller_input(
                                c->data[2] |
                                c->data[3] << 8);   // 铰接转向滚轮输入的模拟量
                        data_.grader_can_status_ptr
                            ->set_analog_input_for_shovel_angle_lift_roller(
                                c->data[4] |
                                c->data[5]
                                    << 8);   // 铲土角升降滚轮输入的模拟量
                        data_.grader_can_status_ptr
                            ->set_analog_input_for_shovel_rotary_roller(
                                c->data[6] |
                                c->data[7] << 8);   // 铲刀回转滚轮输入的模拟量
                        break;

                    case 0x18FF1008:
                        ADEBUG_F("receive data ID: 0x18FF1008");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_analog_input_of_rear_loosening_roller(
                                c->data[0] |
                                c->data[1] << 8);   // 后松升降滚轮输入的模拟量
                        data_.grader_can_status_ptr
                            ->set_analog_input_from_articulating_cylinder_sensor(
                                (c->data[2] | c->data[3] << 8) *
                                0.01);   // 铰接油缸传感器输入的模拟量
                        data_.grader_can_status_ptr
                            ->set_torque_converter_oil_temperature_sensor(
                                c->data[4] | c->data[5]
                                                 << 8);   // 变矩器油温传感器
                        data_.grader_can_status_ptr->set_speed_signal_p1(
                            c->data[6] | c->data[7] << 8);   // 车速信号 p1
                        break;

                    case 0x18FF1009:
                        ADEBUG_F("receive data ID: 0x18FF1009");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_left_lifting_cylinder_lift(
                                c->data[0] |
                                (c->data[1] << 8));   // 左提升油缸升
                        data_.grader_can_status_ptr
                            ->set_left_lifting_cylinder_lowering(
                                c->data[2] |
                                (c->data[3] << 8));   // 左提升油缸降
                        data_.grader_can_status_ptr
                            ->set_front_wheel_leaning_left(
                                c->data[4] | (c->data[5] << 8));   // 前轮左倾
                        data_.grader_can_status_ptr
                            ->set_front_wheel_cleaning_right(
                                c->data[6] | (c->data[7] << 8));   // 前轮右倾
                        break;
                    case 0x18FF1011:
                        ADEBUG_F("receive data ID: 0x18FF1011");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_rotation_support_smooth_rotation(
                                c->data[0] |
                                (c->data[1] << 8));   // 回转支撑顺转
                        data_.grader_can_status_ptr
                            ->set_rotation_support_reversal(
                                c->data[2] |
                                (c->data[3] << 8));   // 回转支撑逆转
                        data_.grader_can_status_ptr->set_spatula_left_swing(
                            c->data[4] | (c->data[5] << 8));   // 铲刀左摆
                        data_.grader_can_status_ptr->set_spatula_right_swing(
                            c->data[6] | (c->data[7] << 8));   // 铲刀右摆
                        break;

                    case 0x18FF1012:
                        ADEBUG_F("receive data ID: 0x18FF1012");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_top_angel_of_shovel_angle(
                                c->data[0] | (c->data[1] << 8));   // 铲土角俯角
                        data_.grader_can_status_ptr
                            ->set_shovel_angle_elevation_angle(
                                c->data[2] | (c->data[3] << 8));   // 铲土角仰角
                        data_.grader_can_status_ptr->set_articulated_left_turn(
                            c->data[4] | (c->data[5] << 8));   // 铰接左转
                        data_.grader_can_status_ptr->set_articulated_right_turn(
                            c->data[6] | (c->data[7] << 8));   // 铰接右转
                        break;

                    case 0x18FF1013:
                        ADEBUG_F("receive data ID: 0x18FF1013");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_shovel_left_lead_out(
                            c->data[0] | (c->data[1] << 8));   // 铲刀左引出
                        data_.grader_can_status_ptr->set_shovel_right_lead_out(
                            c->data[2] | (c->data[3] << 8));   // 铲刀右引出
                        data_.grader_can_status_ptr->set_front_push_up(
                            c->data[4] | (c->data[5] << 8));   // 前推升
                        data_.grader_can_status_ptr->set_front_push_down(
                            c->data[6] | (c->data[7] << 8));   // 前推降
                        break;

                    case 0x18FF1014:
                        ADEBUG_F("receive data ID: 0x18FF1014");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_after_loose_up(
                            c->data[0] | (c->data[1] << 8));   // 后松升
                        data_.grader_can_status_ptr->set_after_loose_down(
                            c->data[2] | (c->data[3] << 8));   // 后松降
                        data_.grader_can_status_ptr
                            ->set_temperature_controlled_fan_system_proportional_output(
                                c->data[4] |
                                (c->data[5] << 8));   // 温控风扇系统比例输出
                        data_.grader_can_status_ptr->set_throttle_signal(
                            c->data[6] |
                            (c->data[7] << 8));   // 右转向油缸传感器
                        break;

                    case 0x18FF1015:
                        ADEBUG_F("receive data ID: 0x18FF1015");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_transmission_oil_pressure_sensor_a(
                                c->data[0] |
                                (c->data[1]
                                 << 8));   // 变速箱油压传感器（电流）
                        data_.grader_can_status_ptr
                            ->set_hydraulic_steering_pressure_sensor(
                                c->data[2] |
                                (c->data[3] << 8));   // 液压转向压力传感器
                        data_.grader_can_status_ptr
                            ->set_transmission_oil_pressure_sensor_r(
                                c->data[4] |
                                (c->data[5] << 8));   // 变速箱油压传感器
                        data_.grader_can_status_ptr->set_turn_control_signal(
                            c->data[6] | (c->data[7] << 8));   // 转向控制信号
                        break;

                    case 0x18FF1016:
                        ADEBUG_F("receive data ID: 0x18FF1016");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_model_code(
                            c->data[0]);   //             车型代码
                        data_.grader_can_status_ptr
                            ->set_electronic_control_program_version(
                                c->data[1] |
                                (c->data[2] << 8));   // 电控程序版本
                        break;

                    case 0x18FF1017:
                        ADEBUG_F("receice data ID: 0x18FF1017");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_locked_status(
                            (c->data[0] >> 0) & 0x01);   //             锁车状态
                        data_.grader_can_status_ptr->set_anti_tamper_status(
                            (c->data[0] >> 1) & 0x01);   // 防拆状态
                        data_.grader_can_status_ptr->set_about_to_lock_cat(
                            (c->data[0] >> 2) & 0x01);   // 即将锁车
                        break;
                    case 0x18FF1018:
                        ADEBUG_F("receive data ID: 0x18FF1018");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_danfoss_main_controller_fault_spn_code((
                                c->data[0] | c->data[1] << 8 |
                                c->data[2] << 16 |
                                c->data[3] << 24));   // 丹福斯主控制器故障SPN码
                        data_.grader_can_status_ptr
                            ->set_danfoss_main_controller_fault_fmi_code(
                                c->data[4]);   // 丹福斯主控制器故障FMI码
                        data_.grader_can_status_ptr
                            ->set_danfoss_main_controller_fault_numbers(
                                c->data[5]);   // 丹福斯主控制器故障次数
                        data_.grader_can_status_ptr
                            ->set_danfoss_safe_controller_fault_fmi_code(
                                c->data[6]);   // 丹福斯安全控制器故障FMI码
                        data_.grader_can_status_ptr
                            ->set_danfoss_safe_controller_fault_numbes(
                                c->data[7]);   // 丹福斯安全控制器故障次数
                        break;
                    case 0x18FF1019:
                        ADEBUG_F("receive data ID: 0x18FF1017");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_danfoss_safe_controller_fault_spn_code(
                                c->data[0] | c->data[1] << 8 |
                                c->data[2] << 16 |
                                c->data[3]
                                    << 24);   // 丹福斯安全控制器故障SPN码
                        data_.grader_can_status_ptr
                            ->set_slope_control_right_hand_incremental_switch(
                                (c->data[4] >> 0) &
                                0x01);   // 坡度控制右侧增量开关
                        data_.grader_can_status_ptr
                            ->set_slope_control_right_hand_reduction_switch(
                                (c->data[4] >> 1) &
                                0x01);   // 坡度控制右侧减量开关
                        data_.grader_can_status_ptr
                            ->set_cross_slope_control_left_side_automatic_switch(
                                (c->data[4] >> 2) &
                                0x01);   // 横坡控制左侧自动开关
                        data_.grader_can_status_ptr
                            ->set_cross_slope_control_left_side_manual_switch(
                                (c->data[4] >> 3) &
                                0x01);   // 横坡控制左侧手动开关
                        data_.grader_can_status_ptr
                            ->set_slope_control_left_hand_incremental_switch(
                                (c->data[4] >> 4) &
                                0x01);   // 坡度控制右侧增量开关
                        data_.grader_can_status_ptr
                            ->set_slope_control_left_hand_reduction_switch(
                                (c->data[4] >> 5) &
                                0x01);   // 坡度控制右侧减量开关
                        data_.grader_can_status_ptr
                            ->set_cross_slope_control_right_side_automatic_switch(
                                (c->data[4] >> 6) &
                                0x01);   // 横坡控制左侧自动开关
                        data_.grader_can_status_ptr
                            ->set_cross_slope_control_right_side_manual_switch(
                                (c->data[4] >> 7) &
                                0x01);   // 横坡控制左侧手动开关

                        data_.grader_can_status_ptr
                            ->set_slope_control_side_shift_automatic_switch(
                                (c->data[5] >> 0) &
                                0x01);   // 坡度控制侧移自动开关
                        data_.grader_can_status_ptr
                            ->set_slope_control_side_shift_manual_switch(
                                (c->data[5] >> 1) &
                                0x01);   // 坡度控制侧移手动开关
                        data_.grader_can_status_ptr
                            ->set_centralized_lubrication_bypass_valve(
                                (c->data[5] >> 2) & 0x01);   // 集中润滑旁通阀
                        data_.grader_can_status_ptr
                            ->set_heated_rearview_mirror_switch(
                                (c->data[5] >> 3) & 0x01);   // 后视镜加热开关

                        data_.grader_can_status_ptr
                            ->set_main_steering_gear_failure_light_alarm(
                                (c->data[7] >> 0) &
                                0x01);   // 主转向器故障光报警
                        data_.grader_can_status_ptr
                            ->set_main_steering_gear_failure_sound_and_light_alarm(
                                (c->data[7] >> 1) &
                                0x01);   // 主转向器故障声光报警
                        data_.grader_can_status_ptr->set_door_switch_alarm(
                            (c->data[7] >> 2) & 0x01);   // 门开关报警
                        data_.grader_can_status_ptr->set_front_fog_light_alarm(
                            (c->data[7] >> 3) & 0x01);   // 前雾灯报警
                        data_.grader_can_status_ptr->set_back_fog_light_alarm(
                            (c->data[7] >> 4) & 0x01);   // 后雾灯报警
                        data_.grader_can_status_ptr
                            ->set_transmission_oil_level_high_alarm(
                                (c->data[7] >> 5) & 0x01);   // 变速箱油位高报警
                        data_.grader_can_status_ptr
                            ->set_transmission_oil_level_low_alarm(
                                (c->data[7] >> 6) & 0x01);   // 变速箱油位低报警
                        data_.grader_can_status_ptr
                            ->set_transmission_sensor_abnormal_alarm(
                                (c->data[7] >> 7) &
                                0x01);   // 变速箱传感器异常报警
                        break;

                    case 0x18FF1020:
                        ADEBUG_F("receive data ID: 0x18FF1020");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        // data_.grader_can_status_ptr->set_danfoss_status_forwarding(c->data);
                        break;
                    case 0x18FF1021:
                        ADEBUG_F("receive data ID: 0x18FF1021");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_park_rocker_switch_signal(
                                c->data[0] >> 0 & 0x01);   // 驻车翘板开关信号
                        data_.grader_can_status_ptr->set_to_do_1(
                            c->data[0] >> 1 & 0x01);   // 预留
                        data_.grader_can_status_ptr->set_key_power_relay(
                            c->data[0] >> 2 & 0x01);   // 钥匙电源继电器
                        data_.grader_can_status_ptr
                            ->set_danfoss_parking_solenoid_valve(
                                c->data[0] >> 3 & 0x01);   // 驻车电磁阀
                        data_.grader_can_status_ptr
                            ->set_transmission_park_signal(
                                c->data[0] >> 4 & 0x01);   // 变速箱驻车信号
                        data_.grader_can_status_ptr->set_transmission_blocking(
                            c->data[0] >> 5 & 0x01);   // 变速箱闭锁
                        data_.grader_can_status_ptr->set_to_do_2(
                            c->data[0] >> 6 & 0x01);   // 预留
                        data_.grader_can_status_ptr
                            ->set_differential_lock_solenoid_valve(
                                c->data[0] >> 7 & 0x01);   // 差速锁电磁阀
                        data_.grader_can_status_ptr->set_fan_speed_sensor(
                            c->data[2] | c->data[3] << 8 | c->data[4] << 16 |
                            c->data[5] << 24);   // 风扇速度传感器
                        break;
                    case 0x18FF1022:
                        ADEBUG_F("receive data ID: 0x18FF1022");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        // data_.grader_can_status_ptr->set_left_rear_wheel_speed
                        // = 372;
                        // // 左后轮转速
                        data_.grader_can_status_ptr->set_right_rear_wheel_speed(
                            c->data[2] | c->data[3] << 8 | c->data[4] << 16 |
                            c->data[5] << 24);   // 右后轮转速
                        data_.grader_can_status_ptr->set_shovel_reversal_2(
                            c->data[6] | c->data[7] << 8);   // 铲刀逆转2
                        break;
                    case 0x18FF1023:
                        ADEBUG_F("receive data ID: 0x18FF1023");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_shovel_knife_smooth_turn_2(
                                c->data[0] | (c->data[1] << 8));   // 铲刀顺转2
                        data_.grader_can_status_ptr
                            ->set_parking_pressure_sensor(
                                c->data[2] |
                                (c->data[3] << 8));   //  驻车压力传感器
                        data_.grader_can_status_ptr
                            ->set_differential_lock_pressure_sensor(
                                c->data[4] |
                                (c->data[5] << 8));   // 差速锁压力传感器
                        break;
                    case 0x18FF1024:
                        ADEBUG_F("receive data ID: 0x18FF1024");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_rear_pine_cylinder_sensor(
                                c->data[0]);   // 后松油缸传感器
                        data_.grader_can_status_ptr->set_shovel_slope_signal(
                            c->data[1]);   // 铲刀坡度信号
                        data_.grader_can_status_ptr
                            ->set_shovel_rotation_angle_signal(
                                c->data[2]);   // 铲刀旋转角度信号
                        data_.grader_can_status_ptr
                            ->set_forward_push_roller_signal(
                                c->data[3]);   // 前推滚轮信号
                        data_.grader_can_status_ptr
                            ->set_rear_loosening_rocker_switch_signal(
                                c->data[4]);   // 后松翘板开关信号
                        data_.grader_can_status_ptr
                            ->set_pendulum_anti_collision_sensor_1(
                                c->data[5]);   // 摆架防碰传感器1
                        data_.grader_can_status_ptr
                            ->set_pendulum_anti_collision_sensor_2(
                                c->data[6]);   // 摆架防碰传感器2
                        data_.grader_can_status_ptr
                            ->set_rear_axle_left_wheel_oil_temperature_high_alarm(
                                (c->data[7] >> 0) &
                                0x01);   // 后桥左轮油温高报警
                        data_.grader_can_status_ptr
                            ->set_rear_axle_right_wheel_oil_temperature_high_alarm(
                                (c->data[7] >> 1) &
                                0x01);   // 后桥右轮油温高报警
                        break;
                    case 0x18FF1025:
                        ADEBUG_F("receive data ID: 0x18FF1025");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr
                            ->set_rear_axle_left_wheel_oil_temperature(
                                c->data[0] - 40);   // 后桥左轮油温温度
                        data_.grader_can_status_ptr
                            ->set_rear_axle_right_wheel_oil_temperature(
                                c->data[1] - 40);   // 后桥右轮油温温度
                        data_.grader_can_status_ptr
                            ->set_shovel_rotation_angle_calibration_value(
                                c->data[2] |
                                (c->data[3]));   // 铲刀旋转角度标定值
                        break;
                    case 0x18FF1026:
                        ADEBUG_F("receive data ID: 0x18FF1026");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_key_switch_power_up(
                            c->data[0] >> 0 & 0x01);   // 钥匙开关上电
                        data_.grader_can_status_ptr
                            ->set_centralized_lubrication_front_end_pressure_switch_alarm(
                                c->data[0] >> 1 &
                                0x01);   // 集中润滑前端压力开关报警
                        data_.grader_can_status_ptr
                            ->set_centralized_lubrication_back_end_pressure_switch_alarm(
                                c->data[0] >> 2 &
                                0x01);   // 集中润滑末端压力开关报警
                        data_.grader_can_status_ptr
                            ->set_centralized_low_lube_oil_level_alarm(
                                c->data[0] >> 3 & 0x01);   // 集中润滑油位低报警
                        data_.grader_can_status_ptr
                            ->set_driver_cab_left_door_switch_signal(
                                c->data[0] >> 4 & 0x01);   // 驾驶室左门开关信号
                        data_.grader_can_status_ptr
                            ->set_driver_cab_right_door_switch_signal(
                                c->data[0] >> 5 & 0x01);   // 驾驶室右门开关信号
                        data_.grader_can_status_ptr
                            ->set_oil_suction_oil_filter_switch(
                                c->data[0] >> 6 & 0x01);   // 吸油油滤开关
                        data_.grader_can_status_ptr
                            ->set_return_oil_filter_switch(
                                c->data[0] >> 7 & 0x01);   // 回油油滤开关

                        data_.grader_can_status_ptr->set_platform_light_switch(
                            c->data[1] >> 0 & 0x01);   // 平台灯开关
                        data_.grader_can_status_ptr->set_seat_belt_switch(
                            c->data[1] >> 1 & 0x01);   // 安全带开关
                        data_.grader_can_status_ptr->set_to_do_3(
                            c->data[1] >> 2 & 0x01);   // 预留
                        data_.grader_can_status_ptr->set_to_do_4(
                            c->data[1] >> 3 & 0x01);   // 预留
                        data_.grader_can_status_ptr->set_to_do_5(
                            c->data[1] >> 4 & 0x01);   // 预留
                        data_.grader_can_status_ptr->set_to_do_6(
                            c->data[1] >> 5 & 0x01);   // 预留
                        data_.grader_can_status_ptr->set_to_do_7(
                            c->data[1] >> 6 & 0x01);   // 预留
                        data_.grader_can_status_ptr->set_to_do_8(
                            c->data[1] >> 7 & 0x01);   // 预留

                        data_.grader_can_status_ptr->set_to_do_9(
                            c->data[2] >> 0 & 0x01);   // 预留
                        data_.grader_can_status_ptr
                            ->set_centralized_lubrication_pump_relay(
                                c->data[2] >> 1 & 0x01);   // 集中润滑泵继电器
                        data_.grader_can_status_ptr
                            ->set_forward_push_floating_solenoid_valve(
                                c->data[2] >> 2 & 0x01);   // 前推浮动电磁阀
                        data_.grader_can_status_ptr->set_radio_mute(
                            c->data[2] >> 3 & 0x01);   // 收音机静音
                        data_.grader_can_status_ptr->set_walkie_talkie_1(
                            c->data[2] >> 4 & 0x01);   // 对讲机1
                        data_.grader_can_status_ptr
                            ->set_left_accumulator_solenoid_valve(
                                c->data[2] >> 5 & 0x01);   // 左蓄能器电磁阀
                        data_.grader_can_status_ptr
                            ->set_right_accumulator_solenoid_valve(
                                c->data[2] >> 6 & 0x01);   // 右蓄能器电磁阀
                        data_.grader_can_status_ptr
                            ->set_rotary_ring_lubrication_solenoid_valve(
                                c->data[2] >> 7 & 0x01);   // 回转圈润滑电磁阀

                        data_.grader_can_status_ptr
                            ->set_trailer_motor_control_signal(
                                c->data[3] >> 0 & 0x01);   // 拖车电机控制信号
                        data_.grader_can_status_ptr
                            ->set_rotary_alarm_light_relay(
                                c->data[3] >> 1 & 0x01);   // 旋转报警灯继电器
                        data_.grader_can_status_ptr->set_low_beam_relay(
                            c->data[3] >> 2 & 0x01);   // 近光灯继电器
                        data_.grader_can_status_ptr->set_cab_headlight_relay(
                            c->data[3] >> 3 & 0x01);   // 驾驶室前灯继电器
                        data_.grader_can_status_ptr->set_cab_rear_light_relay(
                            c->data[3] >> 4 & 0x01);   // 驾驶室后灯继电器
                        data_.grader_can_status_ptr->set_shovel_light_relay(
                            c->data[3] >> 5 & 0x01);   // 铲刀灯继电器
                        data_.grader_can_status_ptr->set_hood_rear_light_relay(
                            c->data[3] >> 6 & 0x01);   // 机罩后灯继电器
                        data_.grader_can_status_ptr->set_platform_light_relay(
                            c->data[3] >> 7 & 0x01);   // 平台灯继电器

                        data_.grader_can_status_ptr->set_outline_light_relay(
                            c->data[4] >> 0 & 0x01);   // 示廓灯继电器
                        data_.grader_can_status_ptr->set_high_beam_relay(
                            c->data[4] >> 1 & 0x01);   // 远光灯继电器
                        data_.grader_can_status_ptr->set_supercharger_relay(
                            c->data[4] >> 2 & 0x01);   // 增压器继电器
                        data_.grader_can_status_ptr->set_defrost_fan_relay(
                            c->data[4] >> 3 & 0x01);   // 除霜风扇继电器
                        data_.grader_can_status_ptr->set_to_do_10(
                            c->data[4] >> 4 & 0x01);   // 预留
                        data_.grader_can_status_ptr->set_to_do_11(
                            c->data[4] >> 5 & 0x01);   // 预留
                        data_.grader_can_status_ptr
                            ->set_heated_rearview_mirror_relay(
                                c->data[4] >> 6 & 0x01);   // 后视镜加热继电器
                        data_.grader_can_status_ptr
                            ->set_hydraulic_oil_preheating_solenoid_valve(
                                c->data[4] >> 7 & 0x01);   // 液压油预热电磁阀
                        data_.grader_can_status_ptr->set_to_do_12(
                            c->data[5] | (c->data[6] << 8));   // 预留
                        break;

                        // 铲刀传感器
                    case 0x18EE0002:
                        ADEBUG_F("receive data ID: 0x18EE0002");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_blades_left(
                            c->data[0] + c->data[1] * 256);
                        data_.grader_can_status_ptr->set_blades_right(
                            c->data[2] + c->data[3] * 256);
                        data_.grader_can_status_ptr->set_blades_slante(
                            c->data[4] + c->data[5] * 256);
                        data_.grader_can_status_ptr->set_blades_translate(
                            c->data[6] + c->data[7] * 256);
                        break;
                    case 0x18EE0003:
                        ADEBUG_F("receive data ID: 0x18EE0003");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_shovel_corner_left(
                            c->data[0] + c->data[1] * 256);
                        data_.grader_can_status_ptr->set_shovel_corner_right(
                            c->data[2] + c->data[3] * 256);
                        data_.grader_can_status_ptr->set_turn_circle(
                            c->data[4] + c->data[5] * 256);
                        break;

                        // remote_state
                    case 0x18FF0096:
                        ADEBUG_F("receive data ID: 0x18FF0096 {}",
                                 (c->data[1]));
                        ADEBUG_F(".......................................");
                        data_.grader_can_status_ptr->set_remote_state(
                            (c->data[0]) == 0x01);
                        break;
                    case 0x18FF08F4:
                        ADEBUG_F("receive data ID: 0x18FF08F4");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.grader_can_status_ptr->set_gps_satellite_num(
                            c->data[0]);
                        data_.grader_can_status_ptr->set_gps_latitude(
                            c->data[1]);
                        data_.grader_can_status_ptr->set_gps_longitude(
                            c->data[2]);
                        data_.grader_can_status_ptr->set_gps_gsm_signal_quality(
                            c->data[3]);
                        data_.grader_can_status_ptr
                            ->set_gps_terminal_power_percentage(c->data[4]);
                        data_.grader_can_status_ptr->set_gps_direction(
                            c->data[5] * 2);
                    default:
                        break;
                    }
                } else if (params_.vehicle_type == "958ev") {
                    switch (c->id) {
                    // 装载机can数据解析
                    //发动机进气温度（-40~210，单位℃）
                    case 0x18FEF500:
                        ADEBUG_F("receive data ID: 0x18FEF500");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr
                            ->set_engine_intake_temperature(c->data[5] - 40);
                        break;
                        //发动机转速（0-3000，单位rpm）
                    case 0x0CF00400:
                        ADEBUG_F("receive data ID: 0x0CF00400");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr->set_engine_speed(
                            (c->data[4] << 8 | c->data[3]) * 0.125);
                        break;
                        //发动机工作工时间（0-2亿，单位h）
                    case 0x18fee500:
                        ADEBUG_F("receive data ID: 0x18fee500");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr->set_engine_work_time(
                            (c->data[3] << 24 | c->data[2] << 16 |
                             c->data[1] << 8 | c->data[0]) *
                            0.05);
                        break;
                        //发动机冷却水温度（-40~210，单位℃）（大于等于105℃报警）
                    case 0x18fee900:
                        ADEBUG_F("receive data ID: 0x18fee900");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr->set_fuel_cost(
                            (c->data[7] << 24 | c->data[6] << 16 |
                             c->data[5] << 8 | c->data[4]) *
                            0.5);
                        break;
                        //变速箱油温度（-50~200，单位℃）（大于等于120℃报警）
                    case 0x18FEEE00:
                        ADEBUG_F("receive data ID: 0x18FEEE00");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr->set_engine_speed(
                            (c->data[0]) - 40);
                        break;
                    case 0x18FEFF00:
                        ADEBUG_F("receive data ID: 0x18FEFF00");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr->set_water_in_oil_light(
                            (c->data[0]));
                        break;
                    case 0x18600109:
                        ADEBUG_F("receive data ID: 0x18600109");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr->set_handbrake(
                            c->data[0]);   // 手刹
                        data_.loader_can_status_ptr->set_power_on_signal(
                            c->data[1]);
                        data_.loader_can_status_ptr->set_fire_signal(
                            c->data[2]);
                        data_.loader_can_status_ptr->set_f_gear(c->data[3]);
                        data_.loader_can_status_ptr->set_n_gear(c->data[4]);
                        data_.loader_can_status_ptr->set_r_gear(c->data[5]);
                        data_.loader_can_status_ptr->set_turn_left_light(
                            c->data[6]);
                        data_.loader_can_status_ptr->set_turn_right_light(
                            c->data[7]);
                        break;
                    case 0x18600110:
                        ADEBUG_F("receive data ID: 0x18600110");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr->set_speed(
                            (c->data[1] << 8 | c->data[0]) * 0.1);
                        data_.loader_can_status_ptr->set_first_gear(c->data[2]);
                        data_.loader_can_status_ptr->set_second_gear(
                            c->data[3]);
                        data_.loader_can_status_ptr->set_high_beam_light(
                            c->data[4]);
                        data_.loader_can_status_ptr->set_low_beam_light(
                            c->data[5]);
                        data_.loader_can_status_ptr->set_front_back_work_light(
                            c->data[6]);
                        data_.loader_can_status_ptr->set_double_flash(
                            c->data[7]);
                        break;
                        ////发动机机油压力（0-1000Kpa）（<=0.7bar,持续5s以上报警后）
                    case 0x18FEEF00:
                        ADEBUG_F("receive data ID: 0x18FEEF00");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr->set_engine_oil_pressure(
                            (c->data[3]) * 4);
                        break;
                    case 0x18600114:
                        ADEBUG_F("receive data ID: 0x18600114");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr->set_battery_voltage(
                            (c->data[1] << 8 | c->data[0]) * 0.001);
                        data_.loader_can_status_ptr->set_steerjoy_switch3(
                            c->data[3] & 0x01);
                        data_.loader_can_status_ptr->set_assist_work_mode(
                            c->data[3] >> 1 & 0x01);   // 辅助铲装模式
                        data_.loader_can_status_ptr->set_auto_walk(
                            c->data[3] >> 2 & 0x01);   // 自动行走
                        data_.loader_can_status_ptr->set_assist_working(
                            c->data[3] >> 3 & 0x01);   // 辅助铲装中
                        data_.loader_can_status_ptr->set_arm_angle(
                            (c->data[5] << 8 | c->data[4]) * 0.01);
                        data_.loader_can_status_ptr->set_bucket_angle(
                            (c->data[7] << 8 | c->data[6]) * 0.01);
                        break;
                        //燃油油位（0-100%）（小于12.5%报警且持续3秒以上报警）
                    case 0x18FF9729:
                        ADEBUG_F("receive data ID: 0x18FF9729");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr->set_fuel_level(
                            (c->data[6] << 8 | c->data[5]) * 0.1);
                        break;
                    case 0x18FF1117:
                        ADEBUG_F("receive data ID: 0x18FF1117");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr->set_brake_pressure_alarm(
                            (c->data[0]) >> 1 & 0x01);
                        data_.loader_can_status_ptr
                            ->set_oil_water_separation_alarm((c->data[2]) >> 6 &
                                                             0x01);
                        data_.loader_can_status_ptr
                            ->set_engine_coolant_liquid_level_low_alarm(
                                (c->data[3]) >> 3 & 0x01);
                        break;
                    case 0x18FECA00:
                        ADEBUG_F("receive data ID: 0x18FECA00");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr->set_engine_failure_alarm(
                            (c->data[1]) >> 2 & 0x03);
                        data_.loader_can_status_ptr->set_engine_spn(
                            (c->data[3] << 8 | c->data[2]) * 0.01);
                        data_.loader_can_status_ptr->set_engine_fmi(c->data[4] &
                                                                    0x1F);
                        data_.loader_can_status_ptr->set_engine_oc(c->data[5] &
                                                                   0x7F);
                        break;
                    case 0x18600115:
                        ADEBUG_F("receive data ID: 0x18FF1117");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr->set_one_radar(
                            (c->data[1] << 8 | c->data[0]) * 0.01);
                        data_.loader_can_status_ptr->set_two_radar(
                            (c->data[3] << 8 | c->data[2]) * 0.01);
                        data_.loader_can_status_ptr->set_three_radar(
                            (c->data[5] << 8 | c->data[4]) * 0.01);
                        break;
                    case 0x18600116:
                        ADEBUG_F("receive data ID: 0x18600116");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr
                            ->set_low_arm_angle_calibration(
                                (c->data[1] << 8 | c->data[0]) * 0.01);
                        data_.loader_can_status_ptr
                            ->set_low_bucket_angle_calibration(
                                (c->data[3] << 8 | c->data[2]) * 0.01);
                        data_.loader_can_status_ptr
                            ->set_high_arm_angle_calibration(
                                (c->data[5] << 8 | c->data[4]) * 0.01);
                        data_.loader_can_status_ptr
                            ->set_high_bucket_angle_calibration(
                                (c->data[7] << 8 | c->data[6]) * 0.01);
                        break;
                    case 0x18FECA03:
                        ADEBUG_F("receive data ID: 0x18FECA03");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr->set_transmission_spn(
                            (c->data[3] << 8 | c->data[2]) * 0.01);
                        data_.loader_can_status_ptr->set_transmission_fmi(
                            (c->data[4]) & 0x1F);
                        data_.loader_can_status_ptr->set_transmission_oc(
                            (c->data[5]) & 0x7F);
                        break;
                    case 0x18F30100:
                        ADEBUG_F("receive id: 0x18F30100");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr->set_push_weight(
                            c->data[0] | c->data[1] << 8);
                        data_.loader_can_status_ptr->set_push_num(
                            c->data[2] | c->data[3] << 8);
                        data_.loader_can_status_ptr->set_total_weight(
                            c->data[4] | c->data[5] << 8 | c->data[6] << 16 |
                            c->data[7] << 24);
                        break;
                    case 0x18F30200:
                        ADEBUG_F("receive id: 0x18F30200");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr->set_rated_safe_weight(
                            c->data[2] | c->data[3] << 8);
                        data_.loader_can_status_ptr->set_percentage_of_push(
                            c->data[4]);
                        break;
                    case 0x18F30300:
                        ADEBUG_F("receive id: 0x18F30300");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr->set_bcd_code_year(
                            c->data[0] | c->data[1] << 8);
                        data_.loader_can_status_ptr->set_bcd_code_month(
                            c->data[2]);
                        data_.loader_can_status_ptr->set_bcd_code_day(
                            c->data[3]);
                        data_.loader_can_status_ptr->set_bcd_code_time(
                            c->data[4]);
                        data_.loader_can_status_ptr->set_bcd_code_min(
                            c->data[5]);
                        data_.loader_can_status_ptr->set_bcd_code_second(
                            c->data[6]);
                        data_.loader_can_status_ptr->set_time_flag(c->data[7]);
                        break;
                    case 0x18F30417:
                        ADEBUG_F("receive id: 0x18F30417");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr->set_bar_cavity_ad(
                            c->data[0] | c->data[1] << 8);
                        data_.loader_can_status_ptr->set_no_bar_cavity_ad(
                            c->data[2] | c->data[3] << 8);
                        data_.loader_can_status_ptr->set_arm_angle(
                            c->data[4] | c->data[5] << 8);
                        break;
                    case 0x10F6F080:
                        ADEBUG_F("receive data ID: 0x10F6F080");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.loader_can_status_ptr->set_hydraulic_lock_switch(
                            c->data[0] & 0x01);   //液压锁开关
                        data_.loader_can_status_ptr->set_danger_flash(
                            c->data[1] & 0x01);   //危险报警闪光灯开关
                        data_.loader_can_status_ptr->set_low_beam(
                            c->data[2] & 0x01);   //近光灯开关
                        data_.loader_can_status_ptr->set_high_beam(
                            c->data[3] & 0x01);   //远光灯开关
                        data_.loader_can_status_ptr->set_front_rear_work_lights(
                            c->data[4] & 0x01);   //前后工作灯
                        data_.loader_can_status_ptr->set_rotating_beacon(
                            c->data[5] & 0x01);   //旋转报警灯开关
                        data_.loader_can_status_ptr->set_diagnostic_rock_switch(
                            c->data[6] & 0x01);   //摇控诊断开关
                        data_.loader_can_status_ptr->set_auto_switch(
                            c->data[7] & 0x01);   // auto功能开关
                        break;
                    case 0x181:
                        ADEBUG_F("receive id: 0x181");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        acc_raw_xc[0] = (unsigned char)c->data[0];
                        acc_raw_xc[1] = (unsigned char)c->data[1];
                        acc_raw_xc[2] = (unsigned char)c->data[2];
                        acc_raw_xc[3] = (unsigned char)c->data[3];
                        acc_raw_yc[0] = (unsigned char)c->data[4];
                        acc_raw_yc[1] = (unsigned char)c->data[5];
                        acc_raw_yc[2] = (unsigned char)c->data[6];
                        acc_raw_yc[3] = (unsigned char)c->data[7];
                        data_.loader_can_status_ptr->mutable_imu_data()
                            ->set_accrawx(acc_raw_x_);
                        data_.loader_can_status_ptr->mutable_imu_data()
                            ->set_accrawy(acc_raw_y_);
                        break;
                    case 0x281:
                        ADEBUG_F("receive id: 0x281");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        acc_raw_zc[0] = (unsigned char)c->data[0];
                        acc_raw_zc[1] = (unsigned char)c->data[1];
                        acc_raw_zc[2] = (unsigned char)c->data[2];
                        acc_raw_zc[3] = (unsigned char)c->data[3];
                        euler_xc[0]   = (unsigned char)c->data[4];
                        euler_xc[1]   = (unsigned char)c->data[5];
                        euler_xc[2]   = (unsigned char)c->data[6];
                        euler_xc[3]   = (unsigned char)c->data[7];
                        data_.loader_can_status_ptr->mutable_imu_data()
                            ->set_accrawz(acc_raw_z_);
                        data_.loader_can_status_ptr->mutable_imu_data()
                            ->set_eulerx(euler_x_);
                        break;
                    case 0x381:
                        ADEBUG_F("receive id 0x381");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        euler_yc[0] = (unsigned char)c->data[0];
                        euler_yc[1] = (unsigned char)c->data[1];
                        euler_yc[2] = (unsigned char)c->data[2];
                        euler_yc[3] = (unsigned char)c->data[3];
                        euler_zc[0] = (unsigned char)c->data[4];
                        euler_zc[1] = (unsigned char)c->data[5];
                        euler_zc[2] = (unsigned char)c->data[6];
                        euler_zc[3] = (unsigned char)c->data[7];
                        data_.loader_can_status_ptr->mutable_imu_data()
                            ->set_eulery(euler_y_);
                        data_.loader_can_status_ptr->mutable_imu_data()
                            ->set_eulerz(euler_z_);
                        break;
                    case 0x481:
                        ADEBUG_F("receive id: 0x481");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        break;
                    case 0x781:
                        ADEBUG_F("receive id: 0x781");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        break;
                    default:
                        break;
                    }
                } else if (params_.vehicle_type == "backhoe") {
                    switch (c->id) {
                    case 0x10F51070:
                        ADEBUG_F("receive id: 0x10F51070");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.backhoe_loader_can_status_ptr->set_voltage(
                            c->data[0] | c->data[1] << 8);   // 电源电压
                        data_.backhoe_loader_can_status_ptr
                            ->set_engine_turn_speed(
                                c->data[6] | c->data[7] << 8);   // 发动机转速
                        break;
                    case 0x10F51570:
                        ADEBUG_F("receive id: 0x10F51570");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.backhoe_loader_can_status_ptr->set_oil_level(
                            c->data[0] | c->data[1] << 8);   // 燃油液位
                        data_.backhoe_loader_can_status_ptr->set_speed(
                            c->data[2] | c->data[3] << 8);   // 车速
                        data_.backhoe_loader_can_status_ptr
                            ->set_transmission_oil_temperature(
                                c->data[4] | c->data[5] << 8);   // 变速箱油温
                        break;
                    case 0x10F52070:
                        ADEBUG_F("receive id: 0x10F52070");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.backhoe_loader_can_status_ptr
                            ->set_transmission_low_pressure_warning(
                                c->data[0] & 0x01);   // 变速箱压力低报警
                        data_.backhoe_loader_can_status_ptr
                            ->set_air_filter_warning(c->data[0] >> 1 &
                                                     0x01);   // 空滤报警
                        data_.backhoe_loader_can_status_ptr
                            ->set_hydraulic_oil_temperature_warning(
                                c->data[0] >> 2 & 0x01);   // 液压油温度报警
                        data_.backhoe_loader_can_status_ptr->set_r_signal(
                            c->data[0] >> 7 & 0x01);   // R信号
                        data_.backhoe_loader_can_status_ptr->set_f_signal(
                            c->data[1] & 0x01);   // F信号
                        data_.backhoe_loader_can_status_ptr->set_h4_signal(
                            c->data[1] >> 3 & 0x01);   // H4信号
                        data_.backhoe_loader_can_status_ptr->set_h3_signal(
                            c->data[1] >> 5 & 0x01);   // H3信号
                        data_.backhoe_loader_can_status_ptr
                            ->set_power_on_signal(c->data[1] >> 7 &
                                                  0x01);   // 上电信号
                        data_.backhoe_loader_can_status_ptr
                            ->set_four_wheel_drive_signal(c->data[2] &
                                                          0x01);   // 四驱信号
                        data_.backhoe_loader_can_status_ptr->set_kd_signal(
                            c->data[2] >> 1 & 0x01);   // KD信号
                        data_.backhoe_loader_can_status_ptr->set_h1_signal(
                            c->data[2] >> 2 & 0x01);   // H1信号
                        data_.backhoe_loader_can_status_ptr
                            ->set_power_cut_off_signal(c->data[2] >> 6 &
                                                       0x01);   // 动力切断信号
                        data_.backhoe_loader_can_status_ptr
                            ->set_handbrake_status(c->data[2] >> 7 &
                                                   0x01);   // 手刹状态
                        data_.backhoe_loader_can_status_ptr
                            ->set_differential_signal(c->data[3] &
                                                      0x01);   // 差速信号
                    case 0x10F53070:
                        ADEBUG_F("receive id: 0x10F53070");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.backhoe_loader_can_status_ptr->set_y6_printer(
                            c->data[0] >> 4 & 0x03);   // Y6输出
                        data_.backhoe_loader_can_status_ptr->set_y5_printer(
                            c->data[0] & 0x03);   // Y5输出
                        data_.backhoe_loader_can_status_ptr
                            ->set_differential_button_power(
                                c->data[1] >> 6 & 0x03);   // 差速按钮电源
                        data_.backhoe_loader_can_status_ptr
                            ->set_differential_lock_printer(
                                c->data[1] >> 4 & 0x03);   // 差速锁输出
                        data_.backhoe_loader_can_status_ptr
                            ->set_handbrake_power_printer(
                                c->data[1] >> 2 & 0x03);   // 手刹电源输出
                        data_.backhoe_loader_can_status_ptr->set_y3_printer(
                            c->data[2] >> 4 & 0x03);   // Y3输出
                        data_.backhoe_loader_can_status_ptr
                            ->set_instrument_key_panel_power(
                                c->data[2] & 0x03);   // 仪表按键面板电源
                        data_.backhoe_loader_can_status_ptr
                            ->set_excitation_printer(c->data[3] >> 4 &
                                                     0x03);   // 励磁输出
                        data_.backhoe_loader_can_status_ptr->set_ed1_printer(
                            c->data[6] & 0x03);   // ED1输出
                        data_.backhoe_loader_can_status_ptr
                            ->set_power_cut_off_power_printer(
                                c->data[7] >> 6 & 0x03);   // 动力切断电源输出
                        data_.backhoe_loader_can_status_ptr->set_y1_printer(
                            c->data[7] >> 4 & 0x03);   // Y1输出
                        data_.backhoe_loader_can_status_ptr
                            ->set_instrument_normal_power(c->data[7] >> 2 &
                                                          0x03);   // 仪表常电
                        data_.backhoe_loader_can_status_ptr
                            ->set_four_wheel_drive_switcher_power_printer(
                                c->data[7] & 0x03);   // 四驱开关电源输出
                        break;
                    case 0x10F53170:
                        ADEBUG_F("receive id: 0x10F53170");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.backhoe_loader_can_status_ptr->set_y4_printer(
                            c->data[0] >> 6 & 0x03);   // Y4输出
                        data_.backhoe_loader_can_status_ptr
                            ->set_four_wheel_drive_switcher_printer(
                                c->data[0] >> 4 & 0x03);   // 四驱阀输出
                        data_.backhoe_loader_can_status_ptr
                            ->set_empty_gear_printer(c->data[1] >> 2 &
                                                     0x03);   // 空档输出
                        data_.backhoe_loader_can_status_ptr->set_y2_printer(
                            c->data[2] >> 6 & 0x03);   // Y2输出
                        data_.backhoe_loader_can_status_ptr->set_r_gear_printer(
                            c->data[2] >> 4 & 0x03);   // R档输出
                        break;
                    case 0x181:
                        ADEBUG_F("receive id: 0x181");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        acc_raw_xc[0] = (unsigned char)c->data[0];
                        acc_raw_xc[1] = (unsigned char)c->data[1];
                        acc_raw_xc[2] = (unsigned char)c->data[2];
                        acc_raw_xc[3] = (unsigned char)c->data[3];
                        acc_raw_yc[0] = (unsigned char)c->data[4];
                        acc_raw_yc[1] = (unsigned char)c->data[5];
                        acc_raw_yc[2] = (unsigned char)c->data[6];
                        acc_raw_yc[3] = (unsigned char)c->data[7];
                        data_.backhoe_loader_can_status_ptr->mutable_imu_data()
                            ->set_accrawx(acc_raw_x_);
                        data_.backhoe_loader_can_status_ptr->mutable_imu_data()
                            ->set_accrawy(acc_raw_y_);
                        break;
                    case 0x281:
                        ADEBUG_F("receive id: 0x281");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        acc_raw_zc[0] = (unsigned char)c->data[0];
                        acc_raw_zc[1] = (unsigned char)c->data[1];
                        acc_raw_zc[2] = (unsigned char)c->data[2];
                        acc_raw_zc[3] = (unsigned char)c->data[3];
                        euler_xc[0]   = (unsigned char)c->data[4];
                        euler_xc[1]   = (unsigned char)c->data[5];
                        euler_xc[2]   = (unsigned char)c->data[6];
                        euler_xc[3]   = (unsigned char)c->data[7];
                        data_.backhoe_loader_can_status_ptr->mutable_imu_data()
                            ->set_accrawz(acc_raw_z_);
                        data_.backhoe_loader_can_status_ptr->mutable_imu_data()
                            ->set_eulerx(euler_x_);
                        break;
                    case 0x381:
                        ADEBUG_F("receive id 0x381");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        euler_yc[0] = (unsigned char)c->data[0];
                        euler_yc[1] = (unsigned char)c->data[1];
                        euler_yc[2] = (unsigned char)c->data[2];
                        euler_yc[3] = (unsigned char)c->data[3];
                        euler_zc[0] = (unsigned char)c->data[4];
                        euler_zc[1] = (unsigned char)c->data[5];
                        euler_zc[2] = (unsigned char)c->data[6];
                        euler_zc[3] = (unsigned char)c->data[7];
                        data_.backhoe_loader_can_status_ptr->mutable_imu_data()
                            ->set_eulery(euler_y_);
                        data_.backhoe_loader_can_status_ptr->mutable_imu_data()
                            ->set_eulerz(euler_z_);
                        break;
                    case 0x481:
                        ADEBUG_F("receive id: 0x481");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        break;
                    case 0x781:
                        ADEBUG_F("receive id: 0x781");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        break;
                    default:
                        break;
                    }
                } else if (params_.vehicle_type == "scraper") {
                    switch (c->id) {
                    case 0x18000401:
                        ADEBUG_F("receive id: 0x18000401");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.scraper_can_status_ptr->set_engine_speed(
                            c->data[0] | c->data[1] << 8);
                        data_.scraper_can_status_ptr->set_coolant_temperature(
                            c->data[2] | c->data[3] << 8);
                        data_.scraper_can_status_ptr->set_oil_pressure(
                            c->data[4] | c->data[5] << 8);
                        tmp_int16_.bytes[0] = c->data[6];
                        tmp_int16_.bytes[1] = c->data[7];
                        data_.scraper_can_status_ptr->set_oil_temperature(
                            tmp_int16_.data);
                        // data_.scraper_can_status_ptr->set_oil_temperature(
                        //     c->data[6] | c->data[7] << 8);
                        break;
                    case 0x18000402:
                        ADEBUG_F("receive id: 0x18000402");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.scraper_can_status_ptr->set_engine_operating_time(
                            (c->data[0] | c->data[1] << 8 | c->data[2] << 16 |
                             c->data[3] << 24) *
                            0.1);
                        data_.scraper_can_status_ptr
                            ->set_engine_total_fuel_consumption(
                                (c->data[4] | c->data[5] << 8 |
                                 c->data[6] << 16 | c->data[7] << 24) *
                                0.1);
                        break;
                    case 0x18000405:
                        ADEBUG_F("receive id: 0x18000405");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        tmp_int16_.bytes[0] = c->data[0];
                        tmp_int16_.bytes[1] = c->data[1];
                        data_.scraper_can_status_ptr->set_arm_angle(
                            tmp_int16_.data * 0.1);
                        data_.scraper_can_status_ptr->set_fuel_level(
                            c->data[2] | c->data[3] << 8);

                        tmp_int16_.bytes[0] = c->data[4];
                        tmp_int16_.bytes[1] = c->data[5];
                        data_.scraper_can_status_ptr->set_turn_angle(
                            tmp_int16_.data * 0.1);
                        // data_.scraper_can_status_ptr->set_turn_angle(
                        //     (c->data[4] | c->data[5] << 8) * 0.1);
                        tmp_int16_.bytes[0] = c->data[6];
                        tmp_int16_.bytes[1] = c->data[7];
                        data_.scraper_can_status_ptr->set_bucket_angle(
                            tmp_int16_.data * 0.1);
                        // data_.scraper_can_status_ptr->set_bucket_angle(
                        //     (c->data[6] | c->data[7] << 8) * 0.1);
                        break;
                    case 0x18000406:
                        ADEBUG_F("receive id: 0x18000406");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        tmp_int16_.bytes[0] = c->data[0];
                        tmp_int16_.bytes[1] = c->data[1];
                        data_.scraper_can_status_ptr->set_arm_height(
                            tmp_int16_.data * 0.01);
                        // data_.scraper_can_status_ptr->set_arm_height(
                        //     (c->data[0] | c->data[1] << 8) * 0.01);
                        tmp_int16_.bytes[0] = c->data[2];
                        tmp_int16_.bytes[1] = c->data[3];
                        data_.scraper_can_status_ptr->set_vehicle_angle_x(
                            tmp_int16_.data * 0.1);
                        // data_.scraper_can_status_ptr->set_vehicle_angle_x(
                        // (c->data[2] | c->data[3] << 8) * 0.1);
                        tmp_int16_.bytes[0] = c->data[4];
                        tmp_int16_.bytes[1] = c->data[5];
                        data_.scraper_can_status_ptr->set_vehicle_angle_y(
                            tmp_int16_.data * 0.1);
                        //    data_.scraper_can_status_ptr->set_vehicle_angle_y(
                        //    (c->data[4] | c->data[5] << 8) * 0.1);
                        break;
                    case 0x18000407:
                        ADEBUG_F("receive id: 0x18000407");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.scraper_can_status_ptr->set_speed(
                            (c->data[2] | c->data[3] << 8) * 0.1);
                        data_.scraper_can_status_ptr->set_forward_back_signal(
                            c->data[4] | c->data[5] << 8);
                        break;
                    case 0x1800040E:
                        ADEBUG_F("receive id: 0x1800040E");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.scraper_can_status_ptr->set_parking_signal(
                            c->data[0] & 0x01);
                        data_.scraper_can_status_ptr->set_red_light(
                            c->data[1] >> 3 & 0x01);
                        data_.scraper_can_status_ptr->set_yellow_light(
                            c->data[1] >> 4 & 0x01);
                        data_.scraper_can_status_ptr->set_green_light(
                            c->data[1] >> 5 & 0x01);
                        break;
                    case 0x1800040F:
                        ADEBUG_F("received id: 0x1800040F");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.scraper_can_status_ptr->set_gear(c->data[0]);
                        break;
                    case 0x1800041B:
                        ADEBUG_F("received id: 0x1800041B");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.scraper_can_status_ptr->set_control_change(
                            c->data[2] >> 3 & 0x01);
                        break;
                    case 0x18000203:
                        ADEBUG_F("received id: 0x18000203");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.scraper_can_status_ptr
                            ->set_low_power_ready_status(c->data[0] >> 2 &
                                                         0x01);
                        data_.scraper_can_status_ptr->set_low_power_status(
                            c->data[0] >> 3 & 0x01);
                        break;
                    case 0x18000511:
                        ADEBUG_F("received id: 0x18000511");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.scraper_can_status_ptr->set_control_mode(
                            c->data[0]);
                        break;
                    case 0x18000611:
                        ADEBUG_F("receicved id: 0x18000611");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.scraper_can_status_ptr->set_camera_changed(
                            c->data[7]);   // 1 前 2左 3后 4右
                        break;
                    case 0x0000023B:
                        ADEBUG_F("received id: 0x0000023B");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.scraper_can_status_ptr
                            ->set_key_screen_switch_enabled(c->data[0] & 0x07);
                        data_.scraper_can_status_ptr->set_key_ok_enabled(
                            c->data[1] & 0x07);
                        data_.scraper_can_status_ptr
                            ->set_key_data_load_query_enabled(
                                (c->data[1] >> 3) & 0x07);
                        data_.scraper_can_status_ptr
                            ->set_key_decrement_bucket_enabled(
                                (c->data[3] >> 3) & 0x07);
                        data_.scraper_can_status_ptr
                            ->set_key_lattice_limit_release_enabled(c->data[4] &
                                                                    0x07);
                        data_.scraper_can_status_ptr
                            ->set_key_sensor_limit_release_enabled(
                                (c->data[4] >> 3) & 0x07);
                        data_.scraper_can_status_ptr
                            ->set_key_door_lock_override_enabled(c->data[5] &
                                                                 0x07);
                        data_.scraper_can_status_ptr->set_key_f1_enabled(
                            (c->data[5] >> 3) & 0x07);
                        break;
                    case 0x18000410:
                        ADEBUG_F("received id: 0x18000410");
                        ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                 "0x{:x} 0x{:x} 0x{:x}",
                                 c->data[0], c->data[1], c->data[2], c->data[3],
                                 c->data[4], c->data[5], c->data[6],
                                 c->data[7]);
                        data_.scraper_can_status_ptr
                            ->set_error_communication_vehicle_controller_and_console_controller(
                                c->data[0] & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_anticollision_limited_action(
                                c->data[0] >> 1 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_communication_imu(c->data[0] >> 2 &
                                                          0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_communication_biaxial_inclination_sensor(
                                c->data[0] >> 3 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_communication_vehicle_pc_and_vehicle_controller(
                                c->data[0] >> 4 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_communication_left_handle(
                                c->data[0] >> 5 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_communication_right_handle(
                                c->data[0] >> 6 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_communication_left_button_borad(
                                c->data[0] >> 7 & 0x01);

                        data_.scraper_can_status_ptr
                            ->set_error_communication_right_front_button_board(
                                c->data[1] & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_communication_engine(c->data[1] >> 1 &
                                                             0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_communication_right_back_button_board(
                                c->data[1] >> 4 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_communication_vehicle_controller_and_console_pc(
                                c->data[1] >> 5 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_engine_air_filter_clogged(
                                c->data[1] >> 7 & 0x01);

                        data_.scraper_can_status_ptr
                            ->set_error_low_hydraulic_oil_level(c->data[2] &
                                                                0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_low_transmission_oil_level(
                                c->data[2] >> 1 & 0x01);
                        data_.scraper_can_status_ptr->set_error_low_fuel_level(
                            c->data[2] >> 2 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_high_hydraulic_oil_temperature(
                                c->data[2] >> 3 & 0x01);

                        data_.scraper_can_status_ptr
                            ->set_error_connection_left_front_ultrasonic_radar(
                                c->data[3] & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_connection_left_back_ultrasonic_radar(
                                c->data[3] >> 1 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_connection_right_front_ultrasonic_radar(
                                c->data[3] >> 2 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_connection_right_back_ultrasonic_radar(
                                c->data[3] >> 3 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_connection_corner_angle_displacement_sensor(
                                c->data[3] >> 4 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_connection_arm_angle_displacement_sensor(
                                c->data[3] >> 5 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_connection_bucket_angle_displacement_sensor(
                                c->data[3] >> 6 & 0x01);
                        data_.scraper_can_status_ptr->set_error_speed_sensor(
                            c->data[3] >> 7 & 0x01);

                        data_.scraper_can_status_ptr
                            ->set_error_communication_front_lidar(
                                c->data[4] >> 2 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_communication_back_lidar(
                                c->data[4] >> 3 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_solenoid_valve_disconnected_turn_left(
                                c->data[4] >> 4 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_solenoid_valve_disconnected_turn_right(
                                c->data[4] >> 5 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_solenoid_valve_disconnected_arm_up(
                                c->data[4] >> 6 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_solenoid_valve_disconnected_arm_down(
                                c->data[4] >> 7 & 0x01);

                        data_.scraper_can_status_ptr
                            ->set_error_solenoid_valve_disconnected_bucket_up(
                                c->data[5] & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_solenoid_valve_disconnected_bucket_down(
                                c->data[5] >> 1 & 0x01);
                        data_.scraper_can_status_ptr->set_error_network_latency(
                            c->data[5] >> 2 & 0x01);
                        data_.scraper_can_status_ptr->set_error_low_voltage(
                            c->data[5] >> 3 & 0x01);
                        data_.scraper_can_status_ptr->set_error_vehicle_lean(
                            c->data[5] >> 4 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_solenoid_valve_forward(c->data[5] >> 5 &
                                                               0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_solenoid_valve_back(c->data[5] >> 6 &
                                                            0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_front_lidar_mirror_contamination(
                                c->data[5] >> 7 & 0x01);

                        data_.scraper_can_status_ptr
                            ->set_error_back_lidar_mirror_contamination(
                                c->data[6] & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_communication_safety_door_a(
                                c->data[6] >> 1 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_communication_safety_door_b(
                                c->data[6] >> 2 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_invasions_safety_door_a(
                                c->data[6] >> 3 & 0x01);
                        data_.scraper_can_status_ptr
                            ->set_error_invasions_safety_door_b(
                                c->data[6] >> 4 & 0x01);
                        break;

                    default:
                        break;
                    }
                } else {
                    AERROR_F("Error vehicle type, can't parse can frame, "
                             "please check "
                             "it !!!");
                }

                if (params_.use_selfmade_handle) {
                    if (params_.vehicle_type == "gr5505") {
                        switch (c->id) {
                        case 0x190:   // left Handle
                            ADEBUG_F("Receive id: 0x190");
                            ADEBUG_F("Data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                     "0x{:x} 0x{:x} 0x{:x}",
                                     c->data[0], c->data[1], c->data[2],
                                     c->data[3], c->data[4], c->data[5],
                                     c->data[6], c->data[7]);
                            data_.left_handle_status_ptr->set_left_x_status(
                                (c->data[0] >> 7) == 0 ? c->data[0]
                                                       : c->data[0] - 256);
                            data_.left_handle_status_ptr->set_left_y_status(
                                (c->data[1] >> 7) == 0 ? c->data[1]
                                                       : c->data[1] - 256);
                            data_.left_handle_status_ptr->set_left_f4_status(
                                (c->data[2] >> 7) == 0 ? c->data[2]
                                                       : c->data[2] - 256);
                            data_.left_handle_status_ptr->set_left_f5_status(
                                (c->data[3] >> 7) == 0 ? c->data[3]
                                                       : c->data[3] - 256);
                            data_.left_handle_status_ptr->set_left_f6_status(
                                (c->data[4] >> 7) == 0 ? c->data[4]
                                                       : c->data[4] - 256);
                            data_.left_handle_status_ptr
                                ->set_left_k7_button_state(c->data[5] >> 0 &
                                                           0x01);
                            data_.left_handle_status_ptr
                                ->set_left_k8_button_state(c->data[5] >> 1 &
                                                           0x01);
                            data_.left_handle_status_ptr
                                ->set_left_k9_button_state(c->data[5] >> 2 &
                                                           0x01);
                            data_.left_handle_status_ptr
                                ->set_left_k10_button_state(c->data[5] >> 3 &
                                                            0x01);
                            data_.left_handle_status_ptr
                                ->set_left_k11_button_state(c->data[5] >> 4 &
                                                            0x01);
                            data_.left_handle_status_ptr
                                ->set_left_k12_button_state(c->data[5] >> 5 &
                                                            0x01);
                            data_.left_handle_status_ptr->set_left_status(
                                c->data[6] >> 3 && 0x01);
                            // CanToUdp(*c);
                            break;
                        case 0x191:   // right handle
                            ADEBUG_F("receive id: 0x191");
                            ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                     "0x{:x} 0x{:x} 0x{:x}",
                                     c->data[0], c->data[1], c->data[2],
                                     c->data[3], c->data[4], c->data[5],
                                     c->data[6], c->data[7]);
                            data_.right_handle_status_ptr->set_right_x_status(
                                (c->data[0] >> 7) == 0 ? c->data[0]
                                                       : c->data[0] - 256);
                            data_.right_handle_status_ptr->set_right_y_status(
                                (c->data[1] >> 7) == 0 ? c->data[1]
                                                       : c->data[1] - 256);
                            data_.right_handle_status_ptr->set_right_f4_status(
                                (c->data[2] >> 7) == 0 ? c->data[2]
                                                       : c->data[2] - 256);
                            data_.right_handle_status_ptr->set_right_f5_status(
                                (c->data[3] >> 7) == 0 ? c->data[3]
                                                       : c->data[3] - 256);
                            data_.right_handle_status_ptr->set_right_f6_status(
                                (c->data[4] >> 7) == 0 ? c->data[4]
                                                       : c->data[4] - 256);
                            data_.right_handle_status_ptr
                                ->set_right_k7_button_state(c->data[5] >> 0 &
                                                            0x01);
                            data_.right_handle_status_ptr
                                ->set_right_k8_button_state(c->data[5] >> 1 &
                                                            0x01);
                            data_.right_handle_status_ptr
                                ->set_right_k9_button_state(c->data[5] >> 2 &
                                                            0x01);
                            data_.right_handle_status_ptr
                                ->set_right_k10_button_state(c->data[5] >> 3 &
                                                             0x01);
                            data_.right_handle_status_ptr
                                ->set_right_k11_button_state(c->data[5] >> 4 &
                                                             0x01);
                            data_.right_handle_status_ptr
                                ->set_right_k12_button_state(c->data[5] >> 5 &
                                                             0x01);
                            data_.right_handle_status_ptr->set_right_status(
                                c->data[6] >> 3 && 0x01);
                            // CanToUdp(*c);
                            break;
                        case 0x0cfdd634:   // left
                        {
                            ADEBUG_F("receive id: 0x0cfdd634");
                            ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                     "0x{:x} 0x{:x} 0x{:x}",
                                     c->data[0], c->data[1], c->data[2],
                                     c->data[3], c->data[4], c->data[5],
                                     c->data[6], c->data[7]);
                            ParseLeftHandleData(c);
                            can_msgs canFrame;
                            canFrame.id  = 0x190;
                            canFrame.dlc = 0x08;
                            for (int i = 0; i < canFrame.dlc; i++)
                                canFrame.data[i] = {0xFF};
                            if (data_.left_joystick_status_ptr
                                    ->negative_x_state() ==
                                xcmg_proto::JoystickStatus::State_yes) {
                                if (data_.left_joystick_status_ptr
                                        ->x_output() <= 1000)
                                    canFrame.data[0] =
                                        0xFF - data_.left_joystick_status_ptr
                                                       ->x_output() /
                                                   10;
                                else
                                    canFrame.data[0] = 0xFF - 100;
                            } else if (data_.left_joystick_status_ptr
                                           ->positive_x_state() ==
                                       xcmg_proto::JoystickStatus::State_yes) {
                                if (data_.left_joystick_status_ptr
                                        ->x_output() <= 1000)
                                    canFrame.data[0] =
                                        data_.left_joystick_status_ptr
                                            ->x_output() /
                                        10;
                                else
                                    canFrame.data[0] = 100;
                            } else {
                                canFrame.data[0] = 0;
                            }
                            ADEBUG_F("data0: {}", canFrame.data[0]);

                            if (data_.left_joystick_status_ptr
                                    ->negative_y_state() ==
                                xcmg_proto::JoystickStatus::State_yes) {
                                if (data_.left_joystick_status_ptr
                                        ->y_output() <= 1000)
                                    canFrame.data[1] =
                                        0xFF - data_.left_joystick_status_ptr
                                                       ->y_output() /
                                                   10;
                                else
                                    canFrame.data[1] = 0xFF - 100;
                            } else if (data_.left_joystick_status_ptr
                                           ->positive_y_state() ==
                                       xcmg_proto::JoystickStatus::State_yes) {
                                if (data_.left_joystick_status_ptr
                                        ->y_output() <= 1000)
                                    canFrame.data[1] =
                                        data_.left_joystick_status_ptr
                                            ->y_output() /
                                        10;
                                else
                                    canFrame.data[1] = 100;
                            } else {
                                canFrame.data[1] = 0;
                            }

                            canFrame.data[2] = 0;
                            canFrame.data[3] = 0;

                            if (data_.left_joystick_status_ptr
                                    ->negative_z3_state() ==
                                xcmg_proto::JoystickStatus::State_yes) {
                                if (data_.left_joystick_status_ptr
                                        ->z3_output() <= 1000)
                                    canFrame.data[4] =
                                        0xFF - data_.left_joystick_status_ptr
                                                       ->z3_output() /
                                                   10;
                                else
                                    canFrame.data[4] = 0xFF - 100;
                            } else if (data_.left_joystick_status_ptr
                                           ->positive_z3_state() ==
                                       xcmg_proto::JoystickStatus::State_yes) {
                                if (data_.left_joystick_status_ptr
                                        ->z3_output() <= 1000)
                                    canFrame.data[4] =
                                        data_.left_joystick_status_ptr
                                            ->z3_output() /
                                        10;
                                else
                                    canFrame.data[4] = 100;
                            } else {
                                canFrame.data[4] = 0;
                            }
                            if (data_.left_joystick_status_ptr
                                    ->positive_z1_state() ==
                                xcmg_proto::JoystickStatus::State_yes) {
                                if (data_.left_joystick_status_ptr
                                        ->z1_output() > 500)
                                    canFrame.data[5] |= 0x02;
                                else
                                    canFrame.data[5] &= 0xFD;
                            } else {
                                canFrame.data[5] &= 0xFD;
                            }
                            if (data_.left_joystick_status_ptr
                                    ->negative_z1_state() ==
                                xcmg_proto::JoystickStatus::State_yes) {
                                if (data_.left_joystick_status_ptr
                                        ->z1_output() > 500)
                                    canFrame.data[5] |= 0x04;
                                else
                                    canFrame.data[5] &= 0xFB;
                            } else {
                                canFrame.data[5] &= 0xFB;
                            }

                            canFrame.data[6] |= 0x08;
                            canFrame.data[7]     = 0xFF;
                            canFrame.is_rtr      = false;
                            canFrame.is_extended = false;
                            ConvertCanToUdp(canFrame);
                            break;
                        }
                        case 0x0cfdd633:   // right
                        {
                            ADEBUG_F("receive id: 0x0cfdd633");
                            ADEBUG_F("data: 0x{:x} 0x{:x} 0x{:x} 0x{:x} 0x{:x} "
                                     "0x{:x} 0x{:x} 0x{:x}",
                                     c->data[0], c->data[1], c->data[2],
                                     c->data[3], c->data[4], c->data[5],
                                     c->data[6], c->data[7]);
                            ParseRightHandleData(c);
                            can_msgs canFrame;
                            canFrame.id  = 0x191;
                            canFrame.dlc = 8;
                            for (int i = 0; i < canFrame.dlc; i++)
                                canFrame.data[i] = {0xFF};

                            if (data_.right_joystick_status_ptr
                                    ->negative_x_state() ==
                                xcmg_proto::JoystickStatus::State_yes) {
                                if (data_.right_joystick_status_ptr
                                        ->x_output() <= 1000)
                                    canFrame.data[0] =
                                        0xFF - data_.right_joystick_status_ptr
                                                       ->x_output() /
                                                   10;
                                else
                                    canFrame.data[0] = 0xFF - 100;
                            } else if (data_.right_joystick_status_ptr
                                           ->positive_x_state() ==
                                       xcmg_proto::JoystickStatus::State_yes) {
                                if (data_.right_joystick_status_ptr
                                        ->x_output() <= 1000)
                                    canFrame.data[0] =
                                        data_.right_joystick_status_ptr
                                            ->x_output() /
                                        10;
                                else
                                    canFrame.data[0] = 100;
                            } else {
                                canFrame.data[0] = 0;
                            }
                            ADEBUG_F("receive data1: 0x{:x}}",
                                     canFrame.data[0]);

                            if (data_.right_joystick_status_ptr
                                    ->negative_y_state() ==
                                xcmg_proto::JoystickStatus::State_yes) {
                                if (data_.right_joystick_status_ptr
                                        ->y_output() <= 1000)
                                    canFrame.data[1] =
                                        0xFF - data_.right_joystick_status_ptr
                                                       ->y_output() /
                                                   10;
                                else
                                    canFrame.data[1] = 0xFF - 100;
                            } else if (data_.right_joystick_status_ptr
                                           ->positive_y_state() ==
                                       xcmg_proto::JoystickStatus::State_yes) {
                                if (data_.right_joystick_status_ptr
                                        ->y_output() <= 1000)
                                    canFrame.data[1] =
                                        data_.right_joystick_status_ptr
                                            ->y_output() /
                                        10;
                                else
                                    canFrame.data[1] = 100;
                            } else {
                                canFrame.data[1] = 0;
                            }

                            canFrame.data[2] = 0;

                            if (data_.right_joystick_status_ptr
                                    ->negative_z3_state() ==
                                xcmg_proto::JoystickStatus::State_yes) {
                                if (data_.right_joystick_status_ptr
                                        ->z3_output() <= 1000)
                                    canFrame.data[3] =
                                        0xFF - data_.right_joystick_status_ptr
                                                       ->z3_output() /
                                                   10;
                                else
                                    canFrame.data[3] = 0xFF - 100;
                            } else if (data_.right_joystick_status_ptr
                                           ->positive_z3_state() ==
                                       xcmg_proto::JoystickStatus::State_yes) {
                                if (data_.right_joystick_status_ptr
                                        ->z3_output() <= 1000)
                                    canFrame.data[3] =
                                        data_.right_joystick_status_ptr
                                            ->z3_output() /
                                        10;
                                else
                                    canFrame.data[3] = 100;
                            } else {
                                canFrame.data[3] = 0;
                            }

                            if (data_.right_joystick_status_ptr
                                    ->negative_z2_state() ==
                                xcmg_proto::JoystickStatus::State_yes) {
                                if (data_.right_joystick_status_ptr
                                        ->z2_output() <= 1000)
                                    canFrame.data[4] =
                                        0xFF - data_.right_joystick_status_ptr
                                                       ->z2_output() /
                                                   10;
                                else
                                    canFrame.data[4] = 0xFF - 100;
                            } else if (data_.right_joystick_status_ptr
                                           ->positive_z2_state() ==
                                       xcmg_proto::JoystickStatus::State_yes) {
                                if (data_.right_joystick_status_ptr
                                        ->z2_output() <= 1000)
                                    canFrame.data[4] =
                                        data_.right_joystick_status_ptr
                                            ->z2_output() /
                                        10;
                                else
                                    canFrame.data[4] = 100;
                            } else {
                                canFrame.data[4] = 0;
                            }

                            if (data_.right_joystick_status_ptr
                                    ->negative_z1_state() ==
                                xcmg_proto::JoystickStatus::State_yes) {
                                if (data_.right_joystick_status_ptr
                                        ->z1_output() > 500)
                                    canFrame.data[5] |= 0x01;
                                else
                                    canFrame.data[5] &= 0xFE;
                            } else
                                canFrame.data[5] &= 0xFE;

                            if (data_.right_joystick_status_ptr
                                    ->positive_z1_state() ==
                                xcmg_proto::JoystickStatus::State_yes) {
                                if (data_.right_joystick_status_ptr
                                        ->z1_output() > 500)
                                    canFrame.data[5] |= 0x02;
                                else
                                    canFrame.data[5] &= 0xFD;
                            } else
                                canFrame.data[5] &= 0xFD;

                            if (data_.right_joystick_status_ptr
                                    ->button_state_size() == 12) {
                                if (data_.right_joystick_status_ptr
                                        ->button_state(0) ==
                                    xcmg_proto::JoystickStatus::
                                        Button_yes)   // bqd
                                    canFrame.data[5] |= 0x04;
                                else
                                    canFrame.data[5] &= 0xFB;

                                if (data_.right_joystick_status_ptr
                                        ->button_state(3) ==
                                    xcmg_proto::JoystickStatus::Button_yes)
                                    canFrame.data[6] |= 0x08;
                                else
                                    canFrame.data[6] &= 0xF7;
                            }
                            canFrame.data[7]     = 0xFF;
                            canFrame.is_rtr      = false;
                            canFrame.is_extended = false;
                            ConvertCanToUdp(canFrame);
                            break;
                        }
                        default:
                            break;
                        }
                    }
                }
            }

            // 左手柄 0x0CFDD633
            void CanetProcessorStage::ParseLeftHandleData(const can_msgs* c) {
                if (c->data[4] == 0xFF) {
                    AINFO_F("Receive first left joystick can");
                    data_.left_joystick_status_ptr->set_middle_x_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[0] & 0x03) + 1));
                    data_.left_joystick_status_ptr->set_negative_x_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[0] >> 2 & 0x03) + 1));
                    data_.left_joystick_status_ptr->set_positive_x_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[0] >> 4 & 0x03) + 1));
                    data_.left_joystick_status_ptr->set_x_output(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[1] << 2) + (c->data[0] >> 6 & 0x03)));

                    data_.left_joystick_status_ptr->set_middle_y_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[2] & 0x03) + 1));
                    data_.left_joystick_status_ptr->set_negative_y_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[2] >> 2 & 0x03) + 1));
                    data_.left_joystick_status_ptr->set_positive_y_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[2] >> 4 & 0x03) + 1));
                    data_.left_joystick_status_ptr->set_y_output(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[3] << 2) + (c->data[2] >> 6 & 0x03)));

                    std::vector<xcmg_proto::JoystickStatus_ButtonType> buttons =
                        {static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[5] >> 6 & 0x03) + 1),
                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[5] >> 4 & 0x03) + 1),
                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[5] >> 2 & 0x03) + 1),
                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[5] >> 0 & 0x03) + 1),

                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[6] >> 6 & 0x03) + 1),
                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[6] >> 4 & 0x03) + 1),
                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[6] >> 2 & 0x03) + 1),
                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[6] >> 0 & 0x03) + 1),

                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[7] >> 6 & 0x03) + 1),
                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[7] >> 4 & 0x03) + 1),
                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[7] >> 2 & 0x03) + 1),
                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[7] >> 0 & 0x03) + 1)};
                    data_.left_joystick_status_ptr->mutable_button_state()
                        ->CopyFrom({buttons.begin(), buttons.end()});
                } else {
                    AINFO_F("Received another left joystick can");

                    data_.left_joystick_status_ptr->set_middle_z3_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[0] & 0x03) + 1));
                    data_.left_joystick_status_ptr->set_negative_z3_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[0] >> 2 & 0x03) + 1));
                    data_.left_joystick_status_ptr->set_positive_z3_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[0] >> 4 & 0x03) + 1));
                    data_.left_joystick_status_ptr->set_z3_output(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[1] << 2) + (c->data[0] >> 6 & 0x03)));

                    data_.left_joystick_status_ptr->set_middle_z1_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[2] & 0x03) + 1));
                    data_.left_joystick_status_ptr->set_negative_z1_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[2] >> 2 & 0x03) + 1));
                    data_.left_joystick_status_ptr->set_positive_z1_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[2] >> 4 & 0x03) + 1));
                    data_.left_joystick_status_ptr->set_z1_output(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[3] << 2) + (c->data[2] >> 6 & 0x03)));

                    data_.left_joystick_status_ptr->set_middle_z2_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[4] & 0x03) + 1));
                    data_.left_joystick_status_ptr->set_negative_z2_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[4] >> 2 & 0x03) + 1));
                    data_.left_joystick_status_ptr->set_positive_z2_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[4] >> 4 & 0x03) + 1));
                    data_.left_joystick_status_ptr->set_z2_output(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[5] << 2) + (c->data[4] >> 6 & 0x03)));

                    data_.left_joystick_status_ptr->set_middle_z4_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[6] & 0x03) + 1));
                    data_.left_joystick_status_ptr->set_negative_z4_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[6] >> 2 & 0x03) + 1));
                    data_.left_joystick_status_ptr->set_positive_z4_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[6] >> 4 & 0x03) + 1));
                    data_.left_joystick_status_ptr->set_z4_output(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[7] << 2) + (c->data[6] >> 6 & 0x03)));
                    AINFO_F("Left Joystick data is publishing by eCAL");
                }
            }

            // 右手柄  0x0CFDD634
            void CanetProcessorStage::ParseRightHandleData(const can_msgs* c) {
                if (c->data[4] == 0xFF) {
                    AINFO_F("Receive first right joystick can");

                    data_.right_joystick_status_ptr->set_middle_x_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[0] & 0x03) + 1));
                    data_.right_joystick_status_ptr->set_negative_x_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[0] >> 2 & 0x03) + 1));
                    data_.right_joystick_status_ptr->set_positive_x_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[0] >> 4 & 0x03) + 1));
                    data_.right_joystick_status_ptr->set_x_output(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[1] << 2) + (c->data[0] >> 6 & 0x03)));

                    data_.right_joystick_status_ptr->set_middle_y_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[2] & 0x03) + 1));
                    data_.right_joystick_status_ptr->set_negative_y_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[2] >> 2 & 0x03) + 1));
                    data_.right_joystick_status_ptr->set_positive_y_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[2] >> 4 & 0x03) + 1));
                    data_.right_joystick_status_ptr->set_y_output(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[3] << 2) + (c->data[2] >> 6 & 0x03)));

                    //            data_.right_joystick_status_ptr->clear_button_state();
                    std::vector<xcmg_proto::JoystickStatus_ButtonType> buttons =
                        {static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[5] >> 6 & 0x03) + 1),
                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[5] >> 4 & 0x03) + 1),
                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[5] >> 2 & 0x03) + 1),
                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[5] >> 0 & 0x03) + 1),

                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[6] >> 6 & 0x03) + 1),
                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[6] >> 4 & 0x03) + 1),
                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[6] >> 2 & 0x03) + 1),
                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[6] >> 0 & 0x03) + 1),

                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[7] >> 6 & 0x03) + 1),
                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[7] >> 4 & 0x03) + 1),
                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[7] >> 2 & 0x03) + 1),
                         static_cast<xcmg_proto::JoystickStatus_ButtonType>(
                             (c->data[7] >> 0 & 0x03) + 1)};
                    data_.right_joystick_status_ptr->mutable_button_state()
                        ->CopyFrom({buttons.begin(), buttons.end()});
                    AINFO_F(
                        "Button size: {}",
                        data_.right_joystick_status_ptr->button_state_size());
                } else {
                    AINFO_F("Receive another right joystick can");

                    data_.right_joystick_status_ptr->set_middle_z3_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[0] & 0x03) + 1));
                    data_.right_joystick_status_ptr->set_negative_z3_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[0] >> 2 & 0x03) + 1));
                    data_.right_joystick_status_ptr->set_positive_z3_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[0] >> 4 & 0x03) + 1));
                    data_.right_joystick_status_ptr->set_z3_output(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[1] << 2) + (c->data[0] >> 6 & 0x03)));

                    data_.right_joystick_status_ptr->set_middle_z1_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[2] & 0x03) + 1));
                    data_.right_joystick_status_ptr->set_negative_z1_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[2] >> 2 & 0x03) + 1));
                    data_.right_joystick_status_ptr->set_positive_z1_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[2] >> 4 & 0x03) + 1));
                    data_.right_joystick_status_ptr->set_z1_output(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[3] << 2) + (c->data[2] >> 6 & 0x03)));

                    data_.right_joystick_status_ptr->set_middle_z2_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[4] & 0x03) + 1));
                    data_.right_joystick_status_ptr->set_negative_z2_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[4] >> 2 & 0x03) + 1));
                    data_.right_joystick_status_ptr->set_positive_z2_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[4] >> 4 & 0x03) + 1));
                    data_.right_joystick_status_ptr->set_z2_output(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[5] << 2) + (c->data[4] >> 6 & 0x03)));

                    data_.right_joystick_status_ptr->set_middle_z4_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[6] & 0x03) + 1));
                    data_.right_joystick_status_ptr->set_negative_z4_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[6] >> 2 & 0x03) + 1));
                    data_.right_joystick_status_ptr->set_positive_z4_state(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[6] >> 4 & 0x03) + 1));
                    data_.right_joystick_status_ptr->set_z4_output(
                        static_cast<xcmg_proto::JoystickStatus_StateType>(
                            (c->data[7] << 2) + (c->data[6] >> 6 & 0x03)));

                    AINFO_F("Right Joystick data is publishing by eCAL");
                }
            }
        }   // namespace stage
    }       // namespace core
}   // namespace xict_cpp